Building energy storage system with peak load contribution cost optimization

ABSTRACT

An energy storage system for a building includes a battery and an energy storage controller. The battery is configured to store electrical energy purchased from a utility and to discharge stored electrical energy for use in satisfying a building energy load. The energy storage controller is configured to generate a cost function including a peak load contribution (PLC) term. The PLC term represents a cost based on electrical energy purchased from the utility during coincidental peak hours in an optimization period. The controller is configured to modify the cost function by applying a peak hours mask to the PLC term. The peak hours mask identifies one or more hours in the optimization period as projected peak hours and causes the energy storage controller to disregard the electrical energy purchased from the utility during any hours not identified as projected peak hours when calculating a value for the PLC term.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.15/405,234, filed Jan. 12, 2017, the entire disclosure of which isincorporated by reference herein.

BACKGROUND

The present disclosure relates generally to an energy storage system orenergy cost optimization system for a building. The present disclosurerelates more particularly to an energy system or energy costoptimization system which optimally allocates energy assets (e.g.,batteries, thermal energy storage, HVAC equipment, etc.) whileaccounting for peak load contribution charges.

Peak load contribution (PLC) is a customer's contribution to regionaldemand peaks that occur in geographic area managed by a regionaltransmission organization (RTO) or independent system operator (ISO) atcertain hours within a base period. The regional demand at a given hourmay be the summation of the customer's demand during (i.e., the rate atwhich the customer purchases electricity or another resource from autility) as well as the demand of other buildings in the geographic areaduring that hour. The customer may be billed based on its contributionto the peak regional demand (e.g., $/kW of the customer's PLC) inaddition to energy consumption charges and demand charges.

Accounting for PLC costs can be more difficult than accounting forenergy consumption costs and demand charges. Unlike demand charge whichis calculated based on the customer's maximum demand duringpredetermined demand charge periods, the hours over which PLC iscalculated may not be known in advance. The hours of peak regionaldemand (i.e., the coincidental peak (CP) hours) may not be known untilthe end of the base period over which PLC is calculated. For example,the CP hours for a given base period (e.g., one year) may be determinedby a RTO at the end of the base period based on the demand of all thebuildings within the geographic area managed by the RTO during the baseperiod (e.g., by selecting the hours with the highest regional demand).The customer's PLC may then be determined based on the customer's demandduring the designated CP hours and used to calculate a cost of thecustomer's PLC. This cost may then be billed to the customer during thenext time period (e.g., the next year), referred to as the billingperiod. It can be difficult and challenging to optimize the allocationof energy assets for a building while accounting for peak loadcontribution charges.

SUMMARY

One implementation of the present disclosure is an energy storage systemfor a building. The system includes a battery and an energy storagecontroller. The battery is configured to store electrical energypurchased from a utility and to discharge the stored electrical energyfor use in satisfying a building energy load. The energy storagecontroller is configured to generate a cost function including a peakload contribution (PLC) term. The PLC term represents a cost based on anamount of the electrical energy purchased from the utility duringcoincidental peak (CP) hours in an optimization period. The controlleris configured to modify the cost function by applying a peak hours maskto the PLC term. The peak hours mask identifies one or more hours in theoptimization period as projected peak hours and causes the energystorage controller to disregard the electrical energy purchased from theutility during any hours not identified as projected peak hours whencalculating a value for the PLC term. The controller is configured toallocate, to each of a plurality of time steps within the optimizationperiod, an optimal amount of electrical energy to store in the batteryor discharge from the battery during the time step by optimizing themodified cost function.

In some embodiments, the CP hours include one or more hours of theoptimization period during which regional demand peaks occur for ageographic region in which the building is located. In some embodiments,the CP hours are unknown prior to the optimization period. The projectedpeak hours may include an estimate of the CP hours and may be identifiedprior to the optimization period.

In some embodiments, the peak hours mask includes a vector of binaryvalues. Each of the binary values may correspond to an hour of theoptimization period and may indicate whether the corresponding hour is aprojected peak hour.

In some embodiments, the energy storage controller is configured tocreate the peak hours mask based on user input defining the projectedpeak hours. In other embodiments, the energy storage controller isconfigured to predict regional demand peaks for a geographic region inwhich the building is located, define the projected peak hours based onthe predicted regional demand peaks, and create the peak hours maskusing the projected peak hours. In some embodiments, the energy storagecontroller is configured to predict the regional demand peaks based onat least one of load history data and weather data for the geographicregion in which the building is located.

In some embodiments, the PLC term includes a rate factor defining a costper unit of the electrical energy purchased from the utility during theCP hours. The energy storage controller may be configured to identify ageographic region in which the building is located and calculate therate factor based on one or more parameters that depend on theidentified geographic region.

In some embodiments, the energy storage controller is configured toidentify the geographic region in which the building is located as aPennsylvania, Jersey, Maryland (PJM) region. The energy storagecontroller can calculate the rate factor based on at least one of acapacity loss factor for the PJM region and a PLC rate for the PJMregion.

In some embodiments, the energy storage controller is configured toidentify the geographic region in which the building is located as anOntario region. The energy storage controller can calculate the ratefactor based on at least one of a region-wide global adjustment cost forthe Ontario region and a region-wide peak load estimate for the Ontarioregion.

Another implementation of the present disclosure is method forallocating a battery asset in an energy storage system. The methodincludes generating a cost function including a peak load contribution(PLC) term. The PLC term represents a cost based on an amount ofelectrical energy purchased from a utility during coincidental peak (CP)hours in an optimization period. The method includes modifying the costfunction by applying a peak hours mask to the PLC term. The peak hoursmask identifies one or more hours in the optimization period asprojected peak hours. The method includes calculating a value for thePLC term in the modified cost function. The peak hours mask causes theelectrical energy purchased from the utility during any hours notidentified as projected peak hours to be disregarded when calculating avalue for the PLC term. The method includes allocating, to each of aplurality of time steps within the optimization period, an optimalamount of electrical energy to store in a battery or discharge from thebattery during the time step by optimizing the modified cost function.The method includes operating the battery to store electrical energypurchased from the utility and discharge the stored electrical energybased on the optimal amounts of electrical energy allocated to each timestep.

In some embodiments, the CP hours include one or more hours of theoptimization period during which regional demand peaks occur for ageographic region in which the building is located. In some embodiments,the CP hours are unknown prior to the optimization period and theprojected peak hours comprise an estimate of the CP hours and areidentified prior to the optimization period.

In some embodiments, the peak hours mask includes a vector of binaryvalues. Each of the binary values may correspond to an hour of theoptimization period and may indicate whether the corresponding hour is aprojected peak hour.

In some embodiments, the method includes predicting regional demandpeaks for a geographic region in which the building is located, definingthe projected peak hours based on the predicted regional demand peaks,and creating the peak hours mask using the projected peak hours. In someembodiments, the regional demand peaks are predicted based on at leastone of load history data and weather data for the geographic region inwhich the building is located.

In some embodiments, the PLC term includes a rate factor defining a costper unit of the electrical energy purchased from the utility during theCP hours. The method may further include identifying a geographic regionin which the building is located and calculating the rate factor basedon one or more parameters that depend on the identified geographicregion.

Another implementation of the present disclosure is an energy costoptimization system for a building. The system includes HVAC equipmentconfigured to consume energy purchased from a utility for use insatisfying a building energy load and a controller. The controller isconfigured to generate a cost function including a peak loadcontribution (PLC) term. The PLC term represents a cost based on anamount of the energy purchased from the utility during coincidental peak(CP) hours in an optimization period. The controller is configured tomodify the cost function by applying a peak hours mask to the PLC term.The peak hours mask identifies one or more hours in the optimizationperiod as projected peak hours and causes the controller to disregardthe energy purchased from the utility during any hours not identified asprojected peak hours when calculating a value for the PLC term. Thecontroller is configured to allocate, to each of a plurality of timesteps within the optimization period, an optimal amount of energy to beconsumed by the HVAC equipment during the time step by optimizing themodified cost function.

In some embodiments, the peak hours mask includes a vector of binaryvalues. Each of the binary values may correspond to an hour of theoptimization period and may indicate whether the corresponding hour is aprojected peak hour.

In some embodiments, the PLC term includes a rate factor defining a costper unit of the energy purchased from the utility during the CP hours.The controller may be configured to identify a geographic region inwhich the building is located and calculate the rate factor based on oneor more parameters that depend on the identified geographic region.

Another implementation of the present disclosure is an energy storagesystem for a building, a group of buildings, or a central plant. Theenergy storage system includes one or more energy storage devices and acontroller. The energy storage devices are configured to store one ormore energy resources (e.g., electricity, hot or cold water, naturalgas, thermal energy, etc.) and to discharge the stored energy resourcesfor use in satisfying an energy load of the building, group ofbuildings, or the central plant. The energy resources may include one ormore energy resource purchased from a utility and/or energy resourcesgenerated by the energy storage system or by the central plant. Theenergy storage controller is configured to generate a cost functionincluding one or more peak load contribution (PLC) terms. Each PLC termrepresents a cost based on an amount of an energy resource purchasedfrom the utility during coincidental peak (CP) hours in an optimizationperiod. The controller is configured to modify the cost function byapplying a peak hours mask to each PLC term. The peak hours maskidentifies one or more hours in the optimization period as projectedpeak hours for a particular energy resource and causes the energystorage controller to disregard any amount of that energy resourcepurchased from the utility during any hours not identified as projectedpeak hours when calculating a value for the PLC term. The energy storagecontroller is configured to allocate, to each of a plurality of timesteps within the optimization period, an optimal amount each energyresource to store in the energy storage devices or discharge from theenergy storage devices during the time step by optimizing the modifiedcost function.

Another implementation of the present disclosure is a method forallocating one or more energy storage devices in an energy storagesystem for a building, group of buildings, or a central plant. Themethod includes generating a cost function including one or more peakload contribution (PLC) terms. Each PLC term represents a cost based onan amount of an energy resource (e.g., electricity, hot or cold water,natural gas, thermal energy, etc.) purchased from a utility duringcoincidental peak (CP) hours in an optimization period. The methodincludes modifying the cost function by applying a peak hours mask toeach PLC term. Each peak hours mask identifies one or more hours in theoptimization period as projected peak hours for one of the energyresources purchased from the utility. The method includes calculating avalue for each PLC term in the modified cost function. The peak hoursmask applied to a PLC term causes any amount of the corresponding energyresource purchased from the utility during any hours not identified asprojected peak hours to be disregarded when calculating a value for thePLC term. The method includes allocating, to each of a plurality of timesteps within the optimization period, an optimal amount of each energyresource purchased from the utility to store in an energy storage deviceor discharge from the energy storage device during the time step byoptimizing the modified cost function. The method includes operating theenergy storage devices to store the energy resources purchased from theutility and discharge the stored energy resources based on the optimalamounts of the energy resources allocated to each time step.

In some embodiments, the method includes allocating one or more otherenergy resources (e.g., energy resources generated by the central plant)in addition to the energy resources purchased from the utility. Themethod may include operating the other energy storage devices to storethe other energy resources and discharge the other stored energyresources based on the optimal amounts of the other energy resourcesallocated to each time step.

Another implementation of the present disclosure is an energy costoptimization system for a building, a group of buildings, or a centralplant. The system includes energy-consuming equipment and a controller.The equipment are configured to consume one or more energy resources(e.g., electricity, hot or cold water, natural gas, thermal energy,etc.) for use in satisfying an energy load of the building, group ofbuildings, or the central plant. The energy resources may include one ormore energy resources purchased from a utility and/or energy resourcesgenerated by the system or by the central plant. The controller isconfigured to generate a cost function including one or more peak loadcontribution (PLC) terms. Each PLC term represents a cost based on anamount of an energy resource purchased from the utility duringcoincidental peak (CP) hours in an optimization period. The controlleris configured to modify the cost function by applying a peak hours maskto each PLC term. Each peak hours mask identifies one or more hours inthe optimization period as projected peak hours for one of the energyresources purchased from the utility and causes the controller todisregard any amount of the energy resource purchased from the utilityduring any hours not identified as projected peak hours when calculatinga value for the PLC term. The controller is configured to allocate, toeach of a plurality of time steps within the optimization period, anoptimal amount of each energy resource to be consumed by the equipmentduring the time step by optimizing the modified cost function.

Those skilled in the art will appreciate that the summary isillustrative only and is not intended to be in any way limiting. Otheraspects, inventive features, and advantages of the devices and/orprocesses described herein, as defined solely by the claims, will becomeapparent in the detailed description set forth herein and taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a frequency response optimization system,according to an exemplary embodiment.

FIG. 2 is a graph of a regulation signal which may be provided to thesystem of FIG. 1 and a frequency response signal which may be generatedby the system of FIG. 1, according to an exemplary embodiment.

FIG. 3 is a block diagram of a photovoltaic energy system configured tosimultaneously perform both ramp rate control and frequency regulationwhile maintaining the state-of-charge of a battery within a desiredrange, according to an exemplary embodiment.

FIG. 4 is a drawing illustrating the electric supply to an energy gridand electric demand from the energy grid which must be balanced in orderto maintain the grid frequency, according to an exemplary embodiment.

FIG. 5A is a block diagram of an energy storage system including thermalenergy storage and electrical energy storage, according to an exemplaryembodiment.

FIG. 5B is a block diagram of an energy cost optimization system withoutthermal or electrical energy storage, according to an exemplaryembodiment.

FIG. 6A is block diagram of an energy storage controller which may beused to operate the energy storage system of FIG. 5A, according to anexemplary embodiment.

FIG. 6B is a block diagram of a controller which may be used to operatethe energy cost optimization system of FIG. 5B, according to anexemplary embodiment.

FIG. 7 is a block diagram of a planning tool which can be used todetermine the benefits of investing in a battery asset and calculatevarious financial metrics associated with the investment, according toan exemplary embodiment.

FIG. 8 is a drawing illustrating the operation of the planning tool ofFIG. 7, according to an exemplary embodiment.

FIG. 9 is a block diagram of a high level optimizer which can beimplemented as a component of the controllers of FIGS. 6A-6B or theplanning tool of FIG. 7, according to an exemplary embodiment.

FIG. 10 is a block diagram illustrating a peak load contribution (PLC)module of the high level optimizer of FIG. 9 in greater detail,according to an exemplary embodiment.

FIG. 11 is a drawing of a user interface that allows a user to selectone or more programs in which to participate, each program adding acorresponding term to a cost function optimizer by the high leveloptimizer, according to an exemplary embodiment.

FIG. 12 is a drawing of a user interface which allows a user to inputvalues for various parameters used by the PLC module of FIG. 10,according to an exemplary embodiment.

FIG. 13 is a drawing of a user interface which allows a user to enter apercent change in various parameters used by the PLC module of FIG. 10from year-to-year, according to an exemplary embodiment.

FIG. 14 is a drawing of a user interface which allows a user to defineprojected coincidental peak (CP) hours that occur during an optimizationperiod, according to an exemplary embodiment.

FIG. 15 is a flowchart of a process for allocating energy storage,according to an exemplary embodiment.

FIG. 16 is a flowchart of a process for optimizing energy cost includinga PLC charge, according to an exemplary embodiment.

DETAILED DESCRIPTION Overview

Referring generally to the FIGURES, an energy storage system with peakload contribution cost optimization and components thereof are shown,according to various exemplary embodiments. The energy storage systemcan determine an optimal allocation of energy storage assets (e.g.,batteries, thermal energy storage, etc.) over an optimization period.The optimal energy allocation may include an amount of energy purchasedfrom utilities, an amount of energy stored or withdrawn from energystorage, and/or an amount of energy sold to energy purchasers or used toparticipate in incentive-based demand response (IBDR) programs. In someembodiments, the optimal allocation maximizes the economic value of theenergy storage assets while satisfying the predicted loads for thebuilding or campus and generating revenue from IBDR programs.

In some embodiments, the energy storage system accounts for a costassociated with a customer's peak load contribution (PLC) whendetermining the optimal allocation of energy storage assets. PLC is acustomer's contribution to regional demand peaks that occur ingeographic area managed by a regional transmission organization (RTO) orindependent system operator (ISO) at certain hours within a base period.The regional demand at a given hour may be the summation of thecustomer's demand during (i.e., the rate at which the customer purchaseselectricity or another resource from a utility) as well as the demand ofother buildings in the geographic area during that hour. The customermay be billed based on its contribution to the peak regional demand(e.g., $/kW of the customer's PLC) in addition to energy consumptioncharges and demand charges.

In some embodiments, the energy storage system includes a controllerconfigured to account for a cost associated with the customer's PLC. Byaccounting for PLC costs, the controller enables the energy storagesystem to allocate resource consumption and resource purchases to reducethe customer's PLC. The energy storage system can reduce PLC costs byshifting the customer's load to non-peak times or shaving the customer'speak load. This can be done, for example, by precooling the buildingduring non-peak times, using thermal energy storage, and/or usingelectrical energy storage such as a battery asset.

Accounting for the cost associated with the customer's PLC can be moredifficult than accounting for energy consumption costs and demandcharges. Unlike demand charge which is calculated based on thecustomer's maximum demand during predetermined demand charge periods,the hours over which PLC is calculated may not be known in advance. Thehours of peak regional demand (i.e., the coincidental peak (CP) hours)may not be known until the end of the base period over which PLC iscalculated. For example, the CP hours for a given base period (e.g., oneyear) may be determined by a RTO at the end of the base period based onthe demand of all the buildings within the geographic area managed bythe RTO during the base period (e.g., by selecting the hours with thehighest regional demand). The customer's PLC may then be determinedbased on the customer's demand during the designated CP hours and usedto calculate a cost of the customer's PLC. This cost may then be billedto the customer during the next time period (e.g., the next year),referred to as the billing period.

In order to account for PLC costs and allocate resourceconsumption/purchases in advance, the controller can generate or obtaina projection of the CP hours for an upcoming base period. The projectedCP hours can then be used as an estimate of the actual CP hours. In someembodiments, the projected peak hours are used to create a peak hoursmask that indicates which of the hours are projected peak hours andwhich of the hours are not projected peak hours. The controller can usethe peak hours mask to modify a cost function that includes a PLC costterm. The controller can optimize the cost function to allocate one ormore assets (e.g., a battery, thermal energy storage, HVAC equipment,etc.) and/or to minimize the customer's demand during the projected CPhours.

The following sections of this disclosure describe the PLC costoptimization technique in greater detail as well as several systemswhich can use the cost optimization technique. For example, the PLC costoptimization can be used in a frequency response optimization systemwith electrical energy storage (described with reference to FIGS. 1-2),a photovoltaic (PV) energy system that simultaneously performs bothfrequency regulation and ramp rate control using electrical energystorage (described with reference to FIGS. 3-4), an energy storagesystem that uses thermal energy storage and/or electrical energy storageto perform load shifting and optimize energy cost (described withreference to FIGS. 5A and 6A), an energy cost optimization systemwithout thermal or electrical energy storage (described with referenceto FIGS. 5B and 6B), and/or a planning tool that determines the benefitsof investing in a battery asset and calculates various financial metricsassociated with the investment (described with reference to FIGS. 7-8).The PLC cost optimization technique is described in greater detail withreference to FIGS. 9-10.

Frequency Response Optimization

Referring now to FIG. 1, a frequency response optimization system 100 isshown, according to an exemplary embodiment. System 100 is shown toinclude a campus 102 and an energy grid 104. Campus 102 may include oneor more buildings 116 that receive power from energy grid 104. Buildings116 may include equipment or devices that consume electricity duringoperation. For example, buildings 116 may include HVAC equipment,lighting equipment, security equipment, communications equipment,vending machines, computers, electronics, elevators, or other types ofbuilding equipment.

In some embodiments, buildings 116 are served by a building managementsystem (BMS). A BMS is, in general, a system of devices configured tocontrol, monitor, and manage equipment in or around a building orbuilding area. A BMS can include, for example, a HVAC system, a securitysystem, a lighting system, a fire alerting system, and/or any othersystem that is capable of managing building functions or devices. Anexemplary building management system which may be used to monitor andcontrol buildings 116 is described in U.S. patent application Ser. No.14/717,593 filed May 20, 2015, the entire disclosure of which isincorporated by reference herein.

In some embodiments, campus 102 includes a central plant 118. Centralplant 118 may include one or more subplants that consume resources fromutilities (e.g., water, natural gas, electricity, etc.) to satisfy theloads of buildings 116. For example, central plant 118 may include aheater subplant, a heat recovery chiller subplant, a chiller subplant, acooling tower subplant, a hot thermal energy storage (TES) subplant, anda cold thermal energy storage (TES) subplant, a steam subplant, and/orany other type of subplant configured to serve buildings 116. Thesubplants may be configured to convert input resources (e.g.,electricity, water, natural gas, etc.) into output resources (e.g., coldwater, hot water, chilled air, heated air, etc.) that are provided tobuildings 116. An exemplary central plant which may be used to satisfythe loads of buildings 116 is described U.S. patent application Ser. No.14/634,609 filed Feb. 27, 2015, the entire disclosure of which isincorporated by reference herein.

In some embodiments, campus 102 includes energy generation 120. Energygeneration 120 may be configured to generate energy that can be used bybuildings 116, used by central plant 118, and/or provided to energy grid104. In some embodiments, energy generation 120 generates electricity.For example, energy generation 120 may include an electric power plant,a photovoltaic energy field, or other types of systems or devices thatgenerate electricity. The electricity generated by energy generation 120can be used internally by campus 102 (e.g., by buildings 116 and/orcentral plant 118) to decrease the amount of electric power that campus102 receives from outside sources such as energy grid 104 or battery108. If the amount of electricity generated by energy generation 120exceeds the electric power demand of campus 102, the excess electricpower can be provided to energy grid 104 or stored in battery 108. Thepower output of campus 102 is shown in FIG. 1 as P_(campus). P_(campus)may be positive if campus 102 is outputting electric power or negativeif campus 102 is receiving electric power.

Still referring to FIG. 1, system 100 is shown to include a powerinverter 106 and a battery 108. Power inverter 106 may be configured toconvert electric power between direct current (DC) and alternatingcurrent (AC). For example, battery 108 may be configured to store andoutput DC power, whereas energy grid 104 and campus 102 may beconfigured to consume and generate AC power. Power inverter 106 may beused to convert DC power from battery 108 into a sinusoidal AC outputsynchronized to the grid frequency of energy grid 104. Power inverter106 may also be used to convert AC power from campus 102 or energy grid104 into DC power that can be stored in battery 108. The power output ofbattery 108 is shown as P_(bat). P_(bat) may be positive if battery 108is providing power to power inverter 106 or negative if battery 108 isreceiving power from power inverter 106.

In some embodiments, power inverter 106 receives a DC power output frombattery 108 and converts the DC power output to an AC power output. TheAC power output can be used to satisfy the energy load of campus 102and/or can be provided to energy grid 104. Power inverter 106 maysynchronize the frequency of the AC power output with that of energygrid 104 (e.g., 50 Hz or 60 Hz) using a local oscillator and may limitthe voltage of the AC power output to no higher than the grid voltage.In some embodiments, power inverter 106 is a resonant inverter thatincludes or uses LC circuits to remove the harmonics from a simplesquare wave in order to achieve a sine wave matching the frequency ofenergy grid 104. In various embodiments, power inverter 106 may operateusing high-frequency transformers, low-frequency transformers, orwithout transformers. Low-frequency transformers may convert the DCoutput from battery 108 directly to the AC output provided to energygrid 104. High-frequency transformers may employ a multi-step processthat involves converting the DC output to high-frequency AC, then backto DC, and then finally to the AC output provided to energy grid 104.

System 100 is shown to include a point of interconnection (POI) 110. POI110 is the point at which campus 102, energy grid 104, and powerinverter 106 are electrically connected. The power supplied to POI 110from power inverter 106 is shown as P_(sup). P_(sup) may be defined asP_(bat)+P_(loss), where P_(batt) is the battery power and P_(loss) isthe power loss in the battery system (e.g., losses in power inverter 106and/or battery 108). P_(bat) and P_(sup) may be positive if powerinverter 106 is providing power to POI 110 or negative if power inverter106 is receiving power from POI 110. P_(campus) and P_(sup) combine atPOI 110 to form P_(POI). P_(POI) may be defined as the power provided toenergy grid 104 from POI 110. P_(POI) may be positive if POI 110 isproviding power to energy grid 104 or negative if POI 110 is receivingpower from energy grid 104.

Still referring to FIG. 1, system 100 is shown to include a frequencyresponse controller 112. Controller 112 may be configured to generateand provide power setpoints to power inverter 106. Power inverter 106may use the power setpoints to control the amount of power P_(sup)provided to POI 110 or drawn from POI 110. For example, power inverter106 may be configured to draw power from POI 110 and store the power inbattery 108 in response to receiving a negative power setpoint fromcontroller 112. Conversely, power inverter 106 may be configured to drawpower from battery 108 and provide the power to POI 110 in response toreceiving a positive power setpoint from controller 112. The magnitudeof the power setpoint may define the amount of power P_(sup) provided toor from power inverter 106. Controller 112 may be configured to generateand provide power setpoints that optimize the value of operating system100 over a time horizon.

In some embodiments, frequency response controller 112 uses powerinverter 106 and battery 108 to perform frequency regulation for energygrid 104. Frequency regulation is the process of maintaining thestability of the grid frequency (e.g., 60 Hz in the United States). Thegrid frequency may remain stable and balanced as long as the totalelectric supply and demand of energy grid 104 are balanced. Anydeviation from that balance may result in a deviation of the gridfrequency from its desirable value. For example, an increase in demandmay cause the grid frequency to decrease, whereas an increase in supplymay cause the grid frequency to increase. Frequency response controller112 may be configured to offset a fluctuation in the grid frequency bycausing power inverter 106 to supply energy from battery 108 to energygrid 104 (e.g., to offset a decrease in grid frequency) or store energyfrom energy grid 104 in battery 108 (e.g., to offset an increase in gridfrequency).

In some embodiments, frequency response controller 112 uses powerinverter 106 and battery 108 to perform load shifting for campus 102.For example, controller 112 may cause power inverter 106 to store energyin battery 108 when energy prices are low and retrieve energy frombattery 108 when energy prices are high in order to reduce the cost ofelectricity required to power campus 102. Load shifting may also allowsystem 100 reduce the demand charge incurred. Demand charge is anadditional charge imposed by some utility providers based on the maximumpower consumption during an applicable demand charge period. Forexample, a demand charge rate may be specified in terms of dollars perunit of power (e.g., $/kW) and may be multiplied by the peak power usage(e.g., kW) during a demand charge period to calculate the demand charge.Load shifting may allow system 100 to smooth momentary spikes in theelectric demand of campus 102 by drawing energy from battery 108 inorder to reduce peak power draw from energy grid 104, thereby decreasingthe demand charge incurred.

Still referring to FIG. 1, system 100 is shown to include an incentiveprovider 114. Incentive provider 114 may be a utility (e.g., an electricutility), a regional transmission organization (RTO), an independentsystem operator (ISO), or any other entity that provides incentives forperforming frequency regulation. For example, incentive provider 114 mayprovide system 100 with monetary incentives for participating in afrequency response program. In order to participate in the frequencyresponse program, system 100 may maintain a reserve capacity of storedenergy (e.g., in battery 108) that can be provided to energy grid 104.System 100 may also maintain the capacity to draw energy from energygrid 104 and store the energy in battery 108. Reserving both of thesecapacities may be accomplished by managing the state-of-charge ofbattery 108.

Frequency response controller 112 may provide incentive provider 114with a price bid and a capability bid. The price bid may include a priceper unit power (e.g., $/MW) for reserving or storing power that allowssystem 100 to participate in a frequency response program offered byincentive provider 114. The price per unit power bid by frequencyresponse controller 112 is referred to herein as the “capability price.”The price bid may also include a price for actual performance, referredto herein as the “performance price.” The capability bid may define anamount of power (e.g., MW) that system 100 will reserve or store inbattery 108 to perform frequency response, referred to herein as the“capability bid.”

Incentive provider 114 may provide frequency response controller 112with a capability clearing price CP_(cap), a performance clearing priceCP_(perf), and a regulation award Reg_(award), which correspond to thecapability price, the performance price, and the capability bid,respectively. In some embodiments, CP_(cap), CP_(perf), and Reg_(award)are the same as the corresponding bids placed by controller 112. Inother embodiments, CP_(cap), CP_(perf), and Reg_(award) may not be thesame as the bids placed by controller 112. For example, CP_(cap),CP_(perf), and Reg_(award) may be generated by incentive provider 114based on bids received from multiple participants in the frequencyresponse program. Controller 112 may use CP_(cap), CP_(perf), andReg_(award) to perform frequency regulation.

Frequency response controller 112 is shown receiving a regulation signalfrom incentive provider 114. The regulation signal may specify a portionof the regulation award Reg_(award) that frequency response controller112 is to add or remove from energy grid 104. In some embodiments, theregulation signal is a normalized signal (e.g., between −1 and 1)specifying a proportion of Reg_(award). Positive values of theregulation signal may indicate an amount of power to add to energy grid104, whereas negative values of the regulation signal may indicate anamount of power to remove from energy grid 104.

Frequency response controller 112 may respond to the regulation signalby generating an optimal power setpoint for power inverter 106. Theoptimal power setpoint may take into account both the potential revenuefrom participating in the frequency response program and the costs ofparticipation. Costs of participation may include, for example, amonetized cost of battery degradation as well as the energy and demandcharges that will be incurred. The optimization may be performed usingsequential quadratic programming, dynamic programming, or any otheroptimization technique.

In some embodiments, controller 112 uses a battery life model toquantify and monetize battery degradation as a function of the powersetpoints provided to power inverter 106. Advantageously, the batterylife model allows controller 112 to perform an optimization that weighsthe revenue generation potential of participating in the frequencyresponse program against the cost of battery degradation and other costsof participation (e.g., less battery power available for campus 102,increased electricity costs, etc.). An exemplary regulation signal andpower response are described in greater detail with reference to FIG. 2.

Referring now to FIG. 2, a pair of frequency response graphs 200 and 250are shown, according to an exemplary embodiment. Graph 200 illustrates aregulation signal Reg_(signal) 202 as a function of time. Reg_(signal)202 is shown as a normalized signal ranging from −1 to 1 (i.e.,−1≤Reg_(signal)≤1). Reg_(signal) 202 may be generated by incentiveprovider 114 and provided to frequency response controller 112.Reg_(signal) 202 may define a proportion of the regulation awardReg_(award) 254 that controller 112 is to add or remove from energy grid104, relative to a baseline value referred to as the midpoint b 256. Forexample, if the value of Reg_(award) 254 is 10 MW, a regulation signalvalue of 0.5 (i.e., Reg_(signal)=0.5) may indicate that system 100 isrequested to add 5 MW of power at POI 110 relative to midpoint b (e.g.,P_(POI)*=10 MW×0.5+b), whereas a regulation signal value of −0.3 mayindicate that system 100 is requested to remove 3 MW of power from POI110 relative to midpoint b (e.g., P_(POI)*=10 MW×−0.3+b).

Graph 250 illustrates the desired interconnection power P_(POI)* 252 asa function of time. P_(POI)* 252 may be calculated by frequency responsecontroller 112 based on Reg_(signal) 202, Reg_(award) 254, and amidpoint b 256. For example, controller 112 may calculate P_(POI)* 252using the following equation:

P _(POI)*=Reg_(award)×Reg_(signal) +b

where P_(POI)* represents the desired power at POI 110 (e.g.,P_(POI)*=P_(sup)+P_(campus)) and b is the midpoint. Midpoint b may bedefined (e.g., set or optimized) by controller 112 and may represent themidpoint of regulation around which the load is modified in response toReg_(signal) 202. Optimal adjustment of midpoint b may allow controller112 to actively participate in the frequency response market while alsotaking into account the energy and demand charge that will be incurred.

In order to participate in the frequency response market, controller 112may perform several tasks. Controller 112 may generate a price bid(e.g., $/MW) that includes the capability price and the performanceprice. In some embodiments, controller 112 sends the price bid toincentive provider 114 at approximately 15:30 each day and the price bidremains in effect for the entirety of the next day. Prior to beginning afrequency response period, controller 112 may generate the capabilitybid (e.g., MW) and send the capability bid to incentive provider 114. Insome embodiments, controller 112 generates and sends the capability bidto incentive provider 114 approximately 1.5 hours before a frequencyresponse period begins. In an exemplary embodiment, each frequencyresponse period has a duration of one hour; however, it is contemplatedthat frequency response periods may have any duration.

At the start of each frequency response period, controller 112 maygenerate the midpoint b around which controller 112 plans to performfrequency regulation. In some embodiments, controller 112 generates amidpoint b that will maintain battery 108 at a constant state-of-charge(SOC) (i.e. a midpoint that will result in battery 108 having the sameSOC at the beginning and end of the frequency response period). In otherembodiments, controller 112 generates midpoint b using an optimizationprocedure that allows the SOC of battery 108 to have different values atthe beginning and end of the frequency response period. For example,controller 112 may use the SOC of battery 108 as a constrained variablethat depends on midpoint b in order to optimize a value function thattakes into account frequency response revenue, energy costs, and thecost of battery degradation. Exemplary techniques for calculating and/oroptimizing midpoint b under both the constant SOC scenario and thevariable SOC scenario are described in detail in U.S. patent applicationSer. No. 15/247,883 filed Aug. 25, 2016, U.S. patent application Ser.No. 15/247,885 filed Aug. 25, 2016, and U.S. patent application Ser. No.15/247,886 filed Aug. 25, 2016. The entire disclosure of each of thesepatent applications is incorporated by reference herein.

During each frequency response period, controller 112 may periodicallygenerate a power setpoint for power inverter 106. For example,controller 112 may generate a power setpoint for each time step in thefrequency response period. In some embodiments, controller 112 generatesthe power setpoints using the equation:

P _(POI)*=Reg_(award)×Reg_(signal) +b

where P_(POI)*=P_(sup)+P_(campus). Positive values of P_(POI)* indicateenergy flow from POI 110 to energy grid 104. Positive values of P_(sup)and P_(campus) indicate energy flow to POI 110 from power inverter 106and campus 102, respectively.

In other embodiments, controller 112 generates the power setpoints usingthe equation:

P _(POI)*=Reg_(award)×Res_(FR) +b

where Res_(FR) is an optimal frequency response generated by optimizinga value function. Controller 112 may subtract P_(campus) from P_(POI)*to generate the power setpoint for power inverter 106 (i.e.,P_(sup)=P_(POI)*−P_(campus)). The power setpoint for power inverter 106indicates the amount of power that power inverter 106 is to add to POI110 (if the power setpoint is positive) or remove from POI 110 (if thepower setpoint is negative). Exemplary techniques which can be used bycontroller 112 to calculate power inverter setpoints are described indetail in U.S. patent application Ser. No. 15/247,793 filed Aug. 25,2016, U.S. patent application Ser. No. 15/247,784 filed Aug. 25, 2016,and U.S. patent application Ser. No. 15/247,777 filed Aug. 25, 2016. Theentire disclosure of each of these patent applications is incorporatedby reference herein.Photovoltaic Energy System with Frequency Regulation and Ramp RateControl

Referring now to FIGS. 3-4, a photovoltaic energy system 300 that usesbattery storage to simultaneously perform both ramp rate control andfrequency regulation is shown, according to an exemplary embodiment.Ramp rate control is the process of offsetting ramp rates (i.e.,increases or decreases in the power output of an energy system such as aphotovoltaic energy system) that fall outside of compliance limitsdetermined by the electric power authority overseeing the energy grid.Ramp rate control typically requires the use of an energy source thatallows for offsetting ramp rates by either supplying additional power tothe grid or consuming more power from the grid. In some instances, afacility is penalized for failing to comply with ramp rate requirements.

Frequency regulation is the process of maintaining the stability of thegrid frequency (e.g., 60 Hz in the United States). As shown in FIG. 4,the grid frequency may remain balanced at 60 Hz as long as there is abalance between the demand from the energy grid and the supply to theenergy grid. An increase in demand yields a decrease in grid frequency,whereas an increase in supply yields an increase in grid frequency.During a fluctuation of the grid frequency, system 300 may offset thefluctuation by either drawing more energy from the energy grid (e.g., ifthe grid frequency is too high) or by providing energy to the energygrid (e.g., if the grid frequency is too low). Advantageously, system300 may use battery storage in combination with photovoltaic power toperform frequency regulation while simultaneously complying with ramprate requirements and maintaining the state-of-charge of the batterystorage within a predetermined desirable range.

Referring particularly to FIG. 3, system 300 is shown to include aphotovoltaic (PV) field 302, a PV field power inverter 304, a battery306, a battery power inverter 308, a point of interconnection (POI) 310,and an energy grid 312. PV field 302 may include a collection ofphotovoltaic cells. The photovoltaic cells are configured to convertsolar energy (i.e., sunlight) into electricity using a photovoltaicmaterial such as monocrystalline silicon, polycrystalline silicon,amorphous silicon, cadmium telluride, copper indium galliumselenide/sulfide, or other materials that exhibit the photovoltaiceffect. In some embodiments, the photovoltaic cells are contained withinpackaged assemblies that form solar panels. Each solar panel may includea plurality of linked photovoltaic cells. The solar panels may combineto form a photovoltaic array.

PV field 302 may have any of a variety of sizes and/or locations. Insome embodiments, PV field 302 is part of a large-scale photovoltaicpower station (e.g., a solar park or farm) capable of providing anenergy supply to a large number of consumers. When implemented as partof a large-scale system, PV field 302 may cover multiple hectares andmay have power outputs of tens or hundreds of megawatts. In otherembodiments, PV field 302 may cover a smaller area and may have arelatively lesser power output (e.g., between one and ten megawatts,less than one megawatt, etc.). For example, PV field 302 may be part ofa rooftop-mounted system capable of providing enough electricity topower a single home or building. It is contemplated that PV field 302may have any size, scale, and/or power output, as may be desirable indifferent implementations.

PV field 302 may generate a direct current (DC) output that depends onthe intensity and/or directness of the sunlight to which the solarpanels are exposed. The directness of the sunlight may depend on theangle of incidence of the sunlight relative to the surfaces of the solarpanels. The intensity of the sunlight may be affected by a variety ofenvironmental factors such as the time of day (e.g., sunrises andsunsets) and weather variables such as clouds that cast shadows upon PVfield 302. When PV field 302 is partially or completely covered byshadow, the power output of PV field 302 (i.e., PV field power P_(PV))may drop as a result of the decrease in solar intensity.

In some embodiments, PV field 302 is configured to maximize solar energycollection. For example, PV field 302 may include a solar tracker (e.g.,a GPS tracker, a sunlight sensor, etc.) that adjusts the angle of thesolar panels so that the solar panels are aimed directly at the sunthroughout the day. The solar tracker may allow the solar panels toreceive direct sunlight for a greater portion of the day and mayincrease the total amount of power produced by PV field 302. In someembodiments, PV field 302 includes a collection of mirrors, lenses, orsolar concentrators configured to direct and/or concentrate sunlight onthe solar panels. The energy generated by PV field 302 may be stored inbattery 306 or provided to energy grid 312.

Still referring to FIG. 3, system 300 is shown to include a PV fieldpower inverter 304. Power inverter 304 may be configured to convert theDC output of PV field 302 P_(PV) into an alternating current (AC) outputthat can be fed into energy grid 312 or used by a local (e.g., off-grid)electrical network. For example, power inverter 304 may be a solarinverter or grid-tie inverter configured to convert the DC output fromPV field 302 into a sinusoidal AC output synchronized to the gridfrequency of energy grid 312. In some embodiments, power inverter 304receives a cumulative DC output from PV field 302. For example, powerinverter 304 may be a string inverter or a central inverter. In otherembodiments, power inverter 304 may include a collection ofmicro-inverters connected to each solar panel or solar cell. PV fieldpower inverter 304 may convert the DC power output P_(PV) into an ACpower output u_(PV) and provide the AC power output u_(PV) to POI 310.

Power inverter 304 may receive the DC power output P_(PV) from PV field302 and convert the DC power output to an AC power output that can befed into energy grid 312. Power inverter 304 may synchronize thefrequency of the AC power output with that of energy grid 312 (e.g., 50Hz or 60 Hz) using a local oscillator and may limit the voltage of theAC power output to no higher than the grid voltage. In some embodiments,power inverter 304 is a resonant inverter that includes or uses LCcircuits to remove the harmonics from a simple square wave in order toachieve a sine wave matching the frequency of energy grid 312. Invarious embodiments, power inverter 304 may operate using high-frequencytransformers, low-frequency transformers, or without transformers.Low-frequency transformers may convert the DC output from PV field 302directly to the AC output provided to energy grid 312. High-frequencytransformers may employ a multi-step process that involves convertingthe DC output to high-frequency AC, then back to DC, and then finally tothe AC output provided to energy grid 312.

Power inverter 304 may be configured to perform maximum power pointtracking and/or anti-islanding. Maximum power point tracking may allowpower inverter 304 to produce the maximum possible AC power from PVfield 302. For example, power inverter 304 may sample the DC poweroutput from PV field 302 and apply a variable resistance to find theoptimum maximum power point. Anti-islanding is a protection mechanismthat immediately shuts down power inverter 304 (i.e., preventing powerinverter 304 from generating AC power) when the connection to anelectricity-consuming load no longer exists. In some embodiments, PVfield power inverter 304 performs ramp rate control by limiting thepower generated by PV field 302.

Still referring to FIG. 3, system 300 is shown to include a batterypower inverter 308. Battery power inverter 308 may be configured to drawa DC power P_(bat) from battery 306, convert the DC power P_(bat) intoan AC power u_(bat), and provide the AC power u_(bat) to POI 310.Battery power inverter 308 may also be configured to draw the AC poweru_(bat) from POI 310, convert the AC power u_(bat) into a DC batterypower P_(bat), and store the DC battery power P_(bat) in battery 306.The DC battery power P_(bat) may be positive if battery 306 is providingpower to battery power inverter 308 (i.e., if battery 306 isdischarging) or negative if battery 306 is receiving power from batterypower inverter 308 (i.e., if battery 306 is charging). Similarly, the ACbattery power u_(bat) may be positive if battery power inverter 308 isproviding power to POI 310 or negative if battery power inverter 308 isreceiving power from POI 310.

The AC battery power u_(bat) is shown to include an amount of power usedfor frequency regulation (i.e., u_(FR)) and an amount of power used forramp rate control (i.e., u_(RR)) which together form the AC batterypower (i.e., u_(bat)=u_(FR)+u_(RR)). The DC battery power P_(bat) isshown to include both u_(FR) and u_(RR) as well as an additional termP_(loss) representing power losses in battery 306 and/or battery powerinverter 308 (i.e., P_(bat)=u_(FR)+u_(RR)+P_(loss)). The PV field poweru_(PV) and the battery power u_(bat) combine at POI 110 to form P_(POI)(i.e., P_(POI)=u_(PV)+u_(bat)), which represents the amount of powerprovided to energy grid 312. P_(POI) may be positive if POI 310 isproviding power to energy grid 312 or negative if POI 310 is receivingpower from energy grid 312.

Still referring to FIG. 3, system 300 is shown to include a controller314. Controller 314 may be configured to generate a PV power setpointu_(PV) for PV field power inverter 304 and a battery power setpointu_(bat) for battery power inverter 308. Throughout this disclosure, thevariable u_(PV) is used to refer to both the PV power setpoint generatedby controller 314 and the AC power output of PV field power inverter 304since both quantities have the same value. Similarly, the variableu_(bat) is used to refer to both the battery power setpoint generated bycontroller 314 and the AC power output/input of battery power inverter308 since both quantities have the same value.

PV field power inverter 304 uses the PV power setpoint u_(PV) to controlan amount of the PV field power P_(PV) to provide to POI 110. Themagnitude of u_(PV) may be the same as the magnitude of P_(PV) or lessthan the magnitude of P_(PV). For example, u_(PV) may be the same asP_(PV) if controller 314 determines that PV field power inverter 304 isto provide all of the photovoltaic power P_(PV) to POI 310. However,u_(PV) may be less than P_(PV) if controller 314 determines that PVfield power inverter 304 is to provide less than all of the photovoltaicpower P_(PV) to POI 310. For example, controller 314 may determine thatit is desirable for PV field power inverter 304 to provide less than allof the photovoltaic power P_(PV) to POI 310 to prevent the ramp ratefrom being exceeded and/or to prevent the power at POI 310 fromexceeding a power limit.

Battery power inverter 308 uses the battery power setpoint u_(bat) tocontrol an amount of power charged or discharged by battery 306. Thebattery power setpoint u_(bat) may be positive if controller 314determines that battery power inverter 308 is to draw power from battery306 or negative if controller 314 determines that battery power inverter308 is to store power in battery 306. The magnitude of u_(bat) controlsthe rate at which energy is charged or discharged by battery 306.

Controller 314 may generate u_(PV) and u_(bat) based on a variety ofdifferent variables including, for example, a power signal from PV field302 (e.g., current and previous values for P_(PV)), the currentstate-of-charge (SOC) of battery 306, a maximum battery power limit, amaximum power limit at POI 310, the ramp rate limit, the grid frequencyof energy grid 312, and/or other variables that can be used bycontroller 314 to perform ramp rate control and/or frequency regulation.Advantageously, controller 314 generates values for u_(PV) and u_(bat)that maintain the ramp rate of the PV power within the ramp ratecompliance limit while participating in the regulation of grid frequencyand maintaining the SOC of battery 306 within a predetermined desirablerange.

An exemplary controller which can be used as controller 314 andexemplary processes which may be performed by controller 314 to generatethe PV power setpoint u_(PV) and the battery power setpoint u_(bat) aredescribed in detail in U.S. patent application Ser. No. 15/247,869 filedAug. 25, 2016, U.S. patent application Ser. No. 15/247,844 filed Aug.25, 2016, U.S. patent application Ser. No. 15/247,788 filed Aug. 25,2016, U.S. patent application Ser. No. 15/247,872 filed Aug. 25, 2016,U.S. patent application Ser. No. 15/247,880 filed Aug. 25, 2016, andU.S. patent application Ser. No. 15/247,873 filed Aug. 25, 2016. Theentire disclosure of each of these patent applications is incorporatedby reference herein.

Energy Storage System with Thermal and Electrical Energy Storage

Referring now to FIG. 5A, a block diagram of an energy storage system500 is shown, according to an exemplary embodiment. Energy storagesystem 500 is shown to include a building 502. Building 502 may be thesame or similar to buildings 116, as described with reference to FIG. 1.For example, building 502 may be equipped with a HVAC system and/or abuilding management system that operates to control conditions withinbuilding 502. In some embodiments, building 502 includes multiplebuildings (i.e., a campus) served by energy storage system 500. Building502 may demand various resources including, for example, hot thermalenergy (e.g., hot water), cold thermal energy (e.g., cold water), and/orelectrical energy. The resources may be demanded by equipment orsubsystems within building 502 or by external systems that provideservices for building 502 (e.g., heating, cooling, air circulation,lighting, electricity, etc.). Energy storage system 500 operates tosatisfy the resource demand associated with building 502.

Energy storage system 500 is shown to include a plurality of utilities510. Utilities 510 may provide energy storage system 500 with resourcessuch as electricity, water, natural gas, or any other resource that canbe used by energy storage system 500 to satisfy the demand of building502. For example, utilities 510 are shown to include an electric utility511, a water utility 512, a natural gas utility 513, and utility M 514,where M is the total number of utilities 510. In some embodiments,utilities 510 are commodity suppliers from which resources and othertypes of commodities can be purchased. Resources purchased fromutilities 510 can be used by generator subplants 520 to producegenerated resources (e.g., hot water, cold water, electricity, steam,etc.), stored in storage subplants 530 for later use, or provideddirectly to building 502. For example, utilities 510 are shown providingelectricity directly to building 502 and storage subplants 530.

Energy storage system 500 is shown to include a plurality of generatorsubplants 520. Generator subplants 520 are shown to include a heatersubplant 521, a chiller subplant 522, a heat recovery chiller subplant523, a steam subplant 524, an electricity subplant 525, and subplant N,where N is the total number of generator subplants 520. Generatorsubplants 520 may be configured to convert one or more input resourcesinto one or more output resources by operation of the equipment withingenerator subplants 520. For example, heater subplant 521 may beconfigured to generate hot thermal energy (e.g., hot water) by heatingwater using electricity or natural gas. Chiller subplant 522 may beconfigured to generate cold thermal energy (e.g., cold water) bychilling water using electricity. Heat recovery chiller subplant 523 maybe configured to generate hot thermal energy and cold thermal energy byremoving heat from one water supply and adding the heat to another watersupply. Steam subplant 524 may be configured to generate steam byboiling water using electricity or natural gas. Electricity subplant 525may be configured to generate electricity using mechanical generators(e.g., a steam turbine, a gas-powered generator, etc.) or other types ofelectricity-generating equipment (e.g., photovoltaic equipment,hydroelectric equipment, etc.).

The input resources used by generator subplants 520 may be provided byutilities 510, retrieved from storage subplants 530, and/or generated byother generator subplants 520. For example, steam subplant 524 mayproduce steam as an output resource. Electricity subplant 525 mayinclude a steam turbine that uses the steam generated by steam subplant524 as an input resource to generate electricity. The output resourcesproduced by generator subplants 520 may be stored in storage subplants530, provided to building 502, sold to energy purchasers 504, and/orused by other generator subplants 520. For example, the electricitygenerated by electricity subplant 525 may be stored in electrical energystorage 533, used by chiller subplant 522 to generate cold thermalenergy, provided to building 502, and/or sold to energy purchasers 504.

Energy storage system 500 is shown to include storage subplants 530.Storage subplants 530 may be configured to store energy and other typesof resources for later use. Each of storage subplants 530 may beconfigured to store a different type of resource. For example, storagesubplants 530 are shown to include hot thermal energy storage 531 (e.g.,one or more hot water storage tanks), cold thermal energy storage 532(e.g., one or more cold thermal energy storage tanks), electrical energystorage 533 (e.g., one or more batteries), and resource type P storage534, where P is the total number of storage subplants 530. The resourcesstored in subplants 530 may be purchased directly from utilities 510 orgenerated by generator subplants 520.

In some embodiments, storage subplants 530 are used by energy storagesystem 500 to take advantage of price-based demand response (PBDR)programs. PBDR programs encourage consumers to reduce consumption whengeneration, transmission, and distribution costs are high. PBDR programsare typically implemented (e.g., by utilities 510) in the form of energyprices that vary as a function of time. For example, utilities 510 mayincrease the price per unit of electricity during peak usage hours toencourage customers to reduce electricity consumption during peak times.Some utilities also charge consumers a separate demand charge based onthe maximum rate of electricity consumption at any time during apredetermined demand charge period.

Advantageously, storing energy and other types of resources in subplants530 allows for the resources to be purchased at times when the resourcesare relatively less expensive (e.g., during non-peak electricity hours)and stored for use at times when the resources are relatively moreexpensive (e.g., during peak electricity hours). Storing resources insubplants 530 also allows the resource demand of building 502 to beshifted in time. For example, resources can be purchased from utilities510 at times when the demand for heating or cooling is low andimmediately converted into hot or cold thermal energy by generatorsubplants 520. The thermal energy can be stored in storage subplants 530and retrieved at times when the demand for heating or cooling is high.This allows energy storage system 500 to smooth the resource demand ofbuilding 502 and reduces the maximum required capacity of generatorsubplants 520. Smoothing the demand also allows energy storage system500 to reduce the peak electricity consumption, which results in a lowerdemand charge.

In some embodiments, storage subplants 530 are used by energy storagesystem 500 to take advantage of incentive-based demand response (IBDR)programs. IBDR programs provide incentives to customers who have thecapability to store energy, generate energy, or curtail energy usageupon request. Incentives are typically provided in the form of monetaryrevenue paid by utilities 510 or by an independent service operator(ISO). IBDR programs supplement traditional utility-owned generation,transmission, and distribution assets with additional options formodifying demand load curves. For example, stored energy can be sold toenergy purchasers 504 (e.g., an energy grid) to supplement the energygenerated by utilities 510. In some instances, incentives forparticipating in an IBDR program vary based on how quickly a system canrespond to a request to change power output/consumption. Fasterresponses may be compensated at a higher level. Advantageously,electrical energy storage 533 allows system 500 to quickly respond to arequest for electric power by rapidly discharging stored electricalenergy to energy purchasers 504.

Still referring to FIG. 5A, energy storage system 500 is shown toinclude an energy storage controller 506. Energy storage controller 506may be configured to control the distribution, production, storage, andusage of resources in energy storage system 500. In some embodiments,energy storage controller 506 performs an optimization process determinean optimal set of control decisions for each time step within anoptimization period. The control decisions may include, for example, anoptimal amount of each resource to purchase from utilities 510, anoptimal amount of each resource to produce or convert using generatorsubplants 520, an optimal amount of each resource to store or removefrom storage subplants 530, an optimal amount of each resource to sellto energy purchasers 504, and/or an optimal amount of each resource toprovide to building 502. In some embodiments, the control decisionsinclude an optimal amount of each input resource and output resource foreach of generator subplants 520.

Controller 506 may be configured to maximize the economic value ofoperating energy storage system 500 over the duration of theoptimization period. The economic value may be defined by a valuefunction that expresses economic value as a function of the controldecisions made by controller 506. The value function may account for thecost of resources purchased from utilities 510, revenue generated byselling resources to energy purchasers 504, and the cost of operatingenergy storage system 500. In some embodiments, the cost of operatingenergy storage system 500 includes a cost for losses in battery capacityas a result of the charging and discharging electrical energy storage533. The cost of operating energy storage system 500 may also include acost of excessive equipment start/stops during the optimization period.

Each of subplants 520-530 may include equipment that can be controlledby energy storage controller 506 to optimize the performance of energystorage system 500. Subplant equipment may include, for example, heatingdevices, chillers, heat recovery heat exchangers, cooling towers, energystorage devices, pumps, valves, and/or other devices of subplants520-530. Individual devices of generator subplants 520 can be turned onor off to adjust the resource production of each generator subplant. Insome embodiments, individual devices of generator subplants 520 can beoperated at variable capacities (e.g., operating a chiller at 10%capacity or 60% capacity) according to an operating setpoint receivedfrom energy storage controller 506.

In some embodiments, one or more of subplants 520-530 includes asubplant level controller configured to control the equipment of thecorresponding subplant. For example, energy storage controller 506 maydetermine an on/off configuration and global operating setpoints for thesubplant equipment. In response to the on/off configuration and receivedglobal operating setpoints, the subplant controllers may turn individualdevices of their respective equipment on or off, and implement specificoperating setpoints (e.g., damper position, vane position, fan speed,pump speed, etc.) to reach or maintain the global operating setpoints.

In some embodiments, controller 506 maximizes the life cycle economicvalue of energy storage system 500 while participating in PBDR programs,IBDR programs, or simultaneously in both PBDR and IBDR programs. For theIBDR programs, controller 506 may use statistical estimates of pastclearing prices, mileage ratios, and event probabilities to determinethe revenue generation potential of selling stored energy to energypurchasers 504. For the PBDR programs, controller 506 may usepredictions of ambient conditions, facility thermal loads, andthermodynamic models of installed equipment to estimate the resourceconsumption of subplants 520. Controller 506 may use predictions of theresource consumption to monetize the costs of running the equipment.

Controller 506 may automatically determine (e.g., without humanintervention) a combination of PBDR and/or IBDR programs in which toparticipate over the optimization period in order to maximize economicvalue. For example, controller 506 may consider the revenue generationpotential of IBDR programs, the cost reduction potential of PBDRprograms, and the equipment maintenance/replacement costs that wouldresult from participating in various combinations of the IBDR programsand PBDR programs. Controller 506 may weigh the benefits ofparticipation against the costs of participation to determine an optimalcombination of programs in which to participate. Advantageously, thisallows controller 506 to determine an optimal set of control decisionsthat maximize the overall value of operating energy storage system 500.

In some instances, controller 506 may determine that it would bebeneficial to participate in an IBDR program when the revenue generationpotential is high and/or the costs of participating are low. Forexample, controller 506 may receive notice of a synchronous reserveevent from an IBDR program which requires energy storage system 500 toshed a predetermined amount of power. Controller 506 may determine thatit is optimal to participate in the IBDR program if cold thermal energystorage 532 has enough capacity to provide cooling for building 502while the load on chiller subplant 522 is reduced in order to shed thepredetermined amount of power.

In other instances, controller 506 may determine that it would not bebeneficial to participate in an IBDR program when the resources requiredto participate are better allocated elsewhere. For example, if building502 is close to setting a new peak demand that would greatly increasethe PBDR costs, controller 506 may determine that only a small portionof the electrical energy stored in electrical energy storage 533 will besold to energy purchasers 504 in order to participate in a frequencyresponse market. Controller 506 may determine that the remainder of theelectrical energy will be used to power chiller subplant 522 to preventa new peak demand from being set.

In some embodiments, energy storage system 500 and controller includesome or all of the components and/or features described in U.S. patentapplication Ser. No. 15/247,875 filed Aug. 25, 2016, U.S. patentapplication Ser. No. 15/247,879 filed Aug. 25, 2016, and U.S. patentapplication Ser. No. 15/247,881 filed Aug. 25, 2016. The entiredisclosure of each of these patent applications is incorporated byreference herein.

Energy Cost Optimization System

Referring now to FIG. 5B, a block diagram of an energy cost optimizationsystem 550 is shown, according to an exemplary embodiment. Energy costoptimization system 550 is shown to include many of the same componentsas energy storage system 500 (described with reference to FIG. 5A) withthe exception of storage subplants 530. System 550 is an example of asystem without thermal or electrical energy storage in which the peakload contribution cost optimization techniques can be implemented.

Energy cost optimization system 550 is shown to include a building 502.Building 502 may be the same or similar to buildings 116, as describedwith reference to FIG. 1. For example, building 502 may be equipped witha HVAC system and/or a building management system that operates tocontrol conditions within building 502. In some embodiments, building502 includes multiple buildings (i.e., a campus) served by energy costoptimization system 550. Building 502 may demand various resourcesincluding, for example, hot thermal energy (e.g., hot water), coldthermal energy (e.g., cold water), and/or electrical energy. Theresources may be demanded by equipment or subsystems within building 502or by external systems that provide services for building 502 (e.g.,heating, cooling, air circulation, lighting, electricity, etc.). Energycost optimization system 550 operates to satisfy the resource demandassociated with building 502.

Energy cost optimization system 550 is shown to include a plurality ofutilities 510. Utilities 510 may provide system 550 with resources suchas electricity, water, natural gas, or any other resource that can beused by system 550 to satisfy the demand of building 502. For example,utilities 510 are shown to include an electric utility 511, a waterutility 512, a natural gas utility 513, and utility M 514, where M isthe total number of utilities 510. In some embodiments, utilities 510are commodity suppliers from which resources and other types ofcommodities can be purchased. Resources purchased from utilities 510 canbe used by generator subplants 520 to produce generated resources (e.g.,hot water, cold water, electricity, steam, etc.) or provided directly tobuilding 502. For example, utilities 510 are shown providing electricitydirectly to building 502.

Energy cost optimization system 550 is shown to include a plurality ofgenerator subplants 520. Generator subplants 520 are shown to include aheater subplant 521, a chiller subplant 522, a heat recovery chillersubplant 523, a steam subplant 524, an electricity subplant 525, andsubplant N, where N is the total number of generator subplants 520.Generator subplants 520 may be configured to convert one or more inputresources into one or more output resources by operation of theequipment within generator subplants 520. For example, heater subplant521 may be configured to generate hot thermal energy (e.g., hot water)by heating water using electricity or natural gas. Chiller subplant 522may be configured to generate cold thermal energy (e.g., cold water) bychilling water using electricity. Heat recovery chiller subplant 523 maybe configured to generate hot thermal energy and cold thermal energy byremoving heat from one water supply and adding the heat to another watersupply. Steam subplant 524 may be configured to generate steam byboiling water using electricity or natural gas. Electricity subplant 525may be configured to generate electricity using mechanical generators(e.g., a steam turbine, a gas-powered generator, etc.) or other types ofelectricity-generating equipment (e.g., photovoltaic equipment,hydroelectric equipment, etc.).

The input resources used by generator subplants 520 may be provided byutilities 510 and/or generated by other generator subplants 520. Forexample, steam subplant 524 may produce steam as an output resource.Electricity subplant 525 may include a steam turbine that uses the steamgenerated by steam subplant 524 as an input resource to generateelectricity. The output resources produced by generator subplants 520may be provided to building 502, sold to energy purchasers 504, and/orused by other generator subplants 520. For example, the electricitygenerated by electricity subplant 525 may be used by chiller subplant522 to generate cold thermal energy, provided to building 502, and/orsold to energy purchasers 504.

Still referring to FIG. 5B, energy cost optimization system 550 is shownto include a controller 552. Controller 552 may be configured to controlthe distribution, production, and usage of resources in system 550. Insome embodiments, controller 552 performs an optimization processdetermine an optimal set of control decisions for each time step withinan optimization period. The control decisions may include, for example,an optimal amount of each resource to purchase from utilities 510, anoptimal amount of each resource to produce or convert using generatorsubplants 520, an optimal amount of each resource to sell to energypurchasers 504, and/or an optimal amount of each resource to provide tobuilding 502. In some embodiments, the control decisions include anoptimal amount of each input resource and output resource for each ofgenerator subplants 520.

Controller 552 may be configured to maximize the economic value ofoperating energy cost optimization system 550 over the duration of theoptimization period. The economic value may be defined by a valuefunction that expresses economic value as a function of the controldecisions made by controller 552. The value function may account for thecost of resources purchased from utilities 510, revenue generated byselling resources to energy purchasers 504, and the cost of operatingsystem 550. In some embodiments, the cost of operating system 550includes a cost of excessive equipment start/stops during theoptimization period.

Each of subplants 520 may include equipment that can be controlled bycontroller 552 to optimize the performance of system 550. Subplantequipment may include, for example, heating devices, chillers, heatrecovery heat exchangers, cooling towers, pumps, valves, and/or otherdevices of subplants 520. Individual devices of generator subplants 520can be turned on or off to adjust the resource production of eachgenerator subplant. In some embodiments, individual devices of generatorsubplants 520 can be operated at variable capacities (e.g., operating achiller at 10% capacity or 60% capacity) according to an operatingsetpoint received from controller 552.

In some embodiments, one or more of subplants 520 includes a subplantlevel controller configured to control the equipment of thecorresponding subplant. For example, controller 552 may determine anon/off configuration and global operating setpoints for the subplantequipment. In response to the on/off configuration and received globaloperating setpoints, the subplant controllers may turn individualdevices of their respective equipment on or off, and implement specificoperating setpoints (e.g., damper position, vane position, fan speed,pump speed, etc.) to reach or maintain the global operating setpoints.

In some embodiments, energy cost optimization system 550 and controller552 include some or all of the components and/or features described inU.S. patent application Ser. No. 15/247,875 filed Aug. 25, 2016, U.S.patent application Ser. No. 15/247,879 filed Aug. 25, 2016, and U.S.patent application Ser. No. 15/247,881 filed Aug. 25, 2016. The entiredisclosure of each of these patent applications is incorporated byreference herein.

Energy Storage Controller

Referring now to FIG. 6A, a block diagram illustrating energy storagecontroller 506 in greater detail is shown, according to an exemplaryembodiment. Energy storage controller 506 is shown providing controldecisions to a building management system (BMS) 606. In someembodiments, BMS 606 is the same or similar the BMS described withreference to FIG. 1. The control decisions provided to BMS 606 mayinclude resource purchase amounts for utilities 510, setpoints forgenerator subplants 520, and/or charge/discharge rates for storagesubplants 530.

BMS 606 may be configured to monitor conditions within a controlledbuilding or building zone. For example, BMS 606 may receive input fromvarious sensors (e.g., temperature sensors, humidity sensors, airflowsensors, voltage sensors, etc.) distributed throughout the building andmay report building conditions to energy storage controller 506.Building conditions may include, for example, a temperature of thebuilding or a zone of the building, a power consumption (e.g., electricload) of the building, a state of one or more actuators configured toaffect a controlled state within the building, or other types ofinformation relating to the controlled building. BMS 606 may operatesubplants 520-530 to affect the monitored conditions within the buildingand to serve the thermal energy loads of the building.

BMS 606 may receive control signals from energy storage controller 506specifying on/off states, charge/discharge rates, and/or setpoints forthe subplant equipment. BMS 606 may control the equipment (e.g., viaactuators, power relays, etc.) in accordance with the control signalsprovided by energy storage controller 506. For example, BMS 606 mayoperate the equipment using closed loop control to achieve the setpointsspecified by energy storage controller 506. In various embodiments, BMS606 may be combined with energy storage controller 506 or may be part ofa separate building management system. According to an exemplaryembodiment, BMS 606 is a METASYS® brand building management system, assold by Johnson Controls, Inc.

Energy storage controller 506 may monitor the status of the controlledbuilding using information received from BMS 606. Energy storagecontroller 506 may be configured to predict the thermal energy loads(e.g., heating loads, cooling loads, etc.) of the building for pluralityof time steps in an optimization period (e.g., using weather forecastsfrom a weather service 604). Energy storage controller 506 may alsopredict the revenue generation potential of IBDR programs using anincentive event history (e.g., past clearing prices, mileage ratios,event probabilities, etc.) from incentive programs 602. Energy storagecontroller 506 may generate control decisions that optimize the economicvalue of operating energy storage system 500 over the duration of theoptimization period subject to constraints on the optimization process(e.g., energy balance constraints, load satisfaction constraints, etc.).The optimization process performed by energy storage controller 506 isdescribed in greater detail below.

According to an exemplary embodiment, energy storage controller 506 isintegrated within a single computer (e.g., one server, one housing,etc.). In various other exemplary embodiments, energy storage controller506 can be distributed across multiple servers or computers (e.g., thatcan exist in distributed locations). In another exemplary embodiment,energy storage controller 506 may integrated with a smart buildingmanager that manages multiple building systems and/or combined with BMS606.

Energy storage controller 506 is shown to include a communicationsinterface 636 and a processing circuit 607. Communications interface 636may include wired or wireless interfaces (e.g., jacks, antennas,transmitters, receivers, transceivers, wire terminals, etc.) forconducting data communications with various systems, devices, ornetworks. For example, communications interface 636 may include anEthernet card and port for sending and receiving data via anEthernet-based communications network and/or a WiFi transceiver forcommunicating via a wireless communications network. Communicationsinterface 636 may be configured to communicate via local area networksor wide area networks (e.g., the Internet, a building WAN, etc.) and mayuse a variety of communications protocols (e.g., BACnet, IP, LON, etc.).

Communications interface 636 may be a network interface configured tofacilitate electronic data communications between energy storagecontroller 506 and various external systems or devices (e.g., BMS 606,subplants 520-530, utilities 510, etc.). For example, energy storagecontroller 506 may receive information from BMS 606 indicating one ormore measured states of the controlled building (e.g., temperature,humidity, electric loads, etc.) and one or more states of subplants520-530 (e.g., equipment status, power consumption, equipmentavailability, etc.). Communications interface 636 may receive inputsfrom BMS 606 and/or subplants 520-530 and may provide operatingparameters (e.g., on/off decisions, setpoints, etc.) to subplants520-530 via BMS 606. The operating parameters may cause subplants520-530 to activate, deactivate, or adjust a setpoint for variousdevices thereof.

Still referring to FIG. 6A, processing circuit 607 is shown to include aprocessor 608 and memory 610. Processor 608 may be a general purpose orspecific purpose processor, an application specific integrated circuit(ASIC), one or more field programmable gate arrays (FPGAs), a group ofprocessing components, or other suitable processing components.Processor 608 may be configured to execute computer code or instructionsstored in memory 610 or received from other computer readable media(e.g., CDROM, network storage, a remote server, etc.).

Memory 610 may include one or more devices (e.g., memory units, memorydevices, storage devices, etc.) for storing data and/or computer codefor completing and/or facilitating the various processes described inthe present disclosure. Memory 610 may include random access memory(RAM), read-only memory (ROM), hard drive storage, temporary storage,non-volatile memory, flash memory, optical memory, or any other suitablememory for storing software objects and/or computer instructions. Memory610 may include database components, object code components, scriptcomponents, or any other type of information structure for supportingthe various activities and information structures described in thepresent disclosure. Memory 610 may be communicably connected toprocessor 608 via processing circuit 607 and may include computer codefor executing (e.g., by processor 608) one or more processes describedherein.

Memory 610 is shown to include a building status monitor 624. Energystorage controller 506 may receive data regarding the overall buildingor building space to be heated or cooled by system 500 via buildingstatus monitor 624. In an exemplary embodiment, building status monitor624 may include a graphical user interface component configured toprovide graphical user interfaces to a user for selecting buildingrequirements (e.g., overall temperature parameters, selecting schedulesfor the building, selecting different temperature levels for differentbuilding zones, etc.).

Energy storage controller 506 may determine on/off configurations andoperating setpoints to satisfy the building requirements received frombuilding status monitor 624. In some embodiments, building statusmonitor 624 receives, collects, stores, and/or transmits cooling loadrequirements, building temperature setpoints, occupancy data, weatherdata, energy data, schedule data, and other building parameters. In someembodiments, building status monitor 624 stores data regarding energycosts, such as pricing information available from utilities 510 (energycharge, demand charge, etc.).

Still referring to FIG. 6A, memory 610 is shown to include a load/ratepredictor 622. Load/rate predictor 622 may be configured to predict thethermal energy loads (

_(k)) of the building or campus for each time step k (e.g., k=1 . . . n)of an optimization period. Load/rate predictor 622 is shown receivingweather forecasts from a weather service 604. In some embodiments,load/rate predictor 622 predicts the thermal energy loads

_(k) as a function of the weather forecasts. In some embodiments,load/rate predictor 622 uses feedback from BMS 606 to predict loads

_(k). Feedback from BMS 606 may include various types of sensory inputs(e.g., temperature, flow, humidity, enthalpy, etc.) or other datarelating to the controlled building (e.g., inputs from a HVAC system, alighting control system, a security system, a water system, etc.).

In some embodiments, load/rate predictor 622 receives a measuredelectric load and/or previous measured load data from BMS 606 (e.g., viabuilding status monitor 624). Load/rate predictor 622 may predict loads

_(k) as a function of a given weather forecast ({circumflex over(ϕ)}_(w)), a day type (clay), the time of day (t), and previous measuredload data (Y_(k-1)). Such a relationship is expressed in the followingequation:

_(k) =f({circumflex over (ϕ)}_(w),day,t|Y _(k-1))

In some embodiments, load/rate predictor 622 uses a deterministic plusstochastic model trained from historical load data to predict loads

_(k). Load/rate predictor 622 may use any of a variety of predictionmethods to predict loads

_(k) (e.g., linear regression for the deterministic portion and an ARmodel for the stochastic portion). Load/rate predictor 622 may predictone or more different types of loads for the building or campus. Forexample, load/rate predictor 622 may predict a hot water load

_(Hot,k) and a cold water load

_(Cold,k) for each time step k within the prediction window. In someembodiments, load/rate predictor 622 makes load/rate predictions usingthe techniques described in U.S. patent application Ser. No. 14/717,593.

Load/rate predictor 622 is shown receiving utility rates from utilities510. Utility rates may indicate a cost or price per unit of a resource(e.g., electricity, natural gas, water, etc.) provided by utilities 510at each time step k in the prediction window. In some embodiments, theutility rates are time-variable rates. For example, the price ofelectricity may be higher at certain times of day or days of the week(e.g., during high demand periods) and lower at other times of day ordays of the week (e.g., during low demand periods). The utility ratesmay define various time periods and a cost per unit of a resource duringeach time period. Utility rates may be actual rates received fromutilities 510 or predicted utility rates estimated by load/ratepredictor 622.

In some embodiments, the utility rates include demand charges for one ormore resources provided by utilities 510. A demand charge may define aseparate cost imposed by utilities 510 based on the maximum usage of aparticular resource (e.g., maximum energy consumption) during a demandcharge period. The utility rates may define various demand chargeperiods and one or more demand charges associated with each demandcharge period. In some instances, demand charge periods may overlappartially or completely with each other and/or with the predictionwindow. Advantageously, demand response optimizer 630 may be configuredto account for demand charges in the high level optimization processperformed by high level optimizer 632. Utilities 510 may be defined bytime-variable (e.g., hourly) prices, a maximum service level (e.g., amaximum rate of consumption allowed by the physical infrastructure or bycontract) and, in the case of electricity, a demand charge or a chargefor the peak rate of consumption within a certain period. Load/ratepredictor 622 may store the predicted loads

_(k) and the utility rates in memory 610 and/or provide the predictedloads

_(k) and the utility rates to demand response optimizer 630.

Still referring to FIG. 6A, memory 610 is shown to include an incentiveestimator 620. Incentive estimator 620 may be configured to estimate therevenue generation potential of participating in various incentive-baseddemand response (IBDR) programs. In some embodiments, incentiveestimator 620 receives an incentive event history from incentiveprograms 602. The incentive event history may include a history of pastIBDR events from incentive programs 602. An IBDR event may include aninvitation from incentive programs 602 to participate in an IBDR programin exchange for a monetary incentive. The incentive event history mayindicate the times at which the past IBDR events occurred and attributesdescribing the IBDR events (e.g., clearing prices, mileage ratios,participation requirements, etc.). Incentive estimator 620 may use theincentive event history to estimate IBDR event probabilities during theoptimization period.

Incentive estimator 620 is shown providing incentive predictions todemand response optimizer 630. The incentive predictions may include theestimated IBDR probabilities, estimated participation requirements, anestimated amount of revenue from participating in the estimated IBDRevents, and/or any other attributes of the predicted IBDR events. Demandresponse optimizer 630 may use the incentive predictions along with thepredicted loads

_(k) and utility rates from load/rate predictor 622 to determine anoptimal set of control decisions for each time step within theoptimization period.

Still referring to FIG. 6A, memory 610 is shown to include a demandresponse optimizer 630. Demand response optimizer 630 may perform acascaded optimization process to optimize the performance of energystorage system 500. For example, demand response optimizer 630 is shownto include a high level optimizer 632 and a low level optimizer 634.High level optimizer 632 may control an outer (e.g., subplant level)loop of the cascaded optimization. High level optimizer 632 maydetermine an optimal set of control decisions for each time step in theprediction window in order to optimize (e.g., maximize) the value ofoperating energy storage system 500. Control decisions made by highlevel optimizer 632 may include, for example, load setpoints for each ofgenerator subplants 520, charge/discharge rates for each of storagesubplants 530, resource purchase amounts for each type of resourcepurchased from utilities 510, and/or an amount of each resource sold toenergy purchasers 504. In other words, the control decisions may defineresource allocation at each time step. The control decisions made byhigh level optimizer 632 are based on the statistical estimates ofincentive event probabilities and revenue generation potential forvarious IBDR events as well as the load and rate predictions.

Low level optimizer 634 may control an inner (e.g., equipment level)loop of the cascaded optimization. Low level optimizer 634 may determinehow to best run each subplant at the load setpoint determined by highlevel optimizer 632. For example, low level optimizer 634 may determineon/off states and/or operating setpoints for various devices of thesubplant equipment in order to optimize (e.g., minimize) the energyconsumption of each subplant while meeting the resource allocationsetpoint for the subplant. In some embodiments, low level optimizer 634receives actual incentive events from incentive programs 602. Low leveloptimizer 634 may determine whether to participate in the incentiveevents based on the resource allocation set by high level optimizer 632.For example, if insufficient resources have been allocated to aparticular IBDR program by high level optimizer 632 or if the allocatedresources have already been used, low level optimizer 634 may determinethat energy storage system 500 will not participate in the IBDR programand may ignore the IBDR event. However, if the required resources havebeen allocated to the IBDR program and are available in storagesubplants 530, low level optimizer 634 may determine that system 500will participate in the IBDR program in response to the IBDR event. Thecascaded optimization process performed by demand response optimizer 630is described in greater detail in U.S. patent application Ser. No.15/247,885.

Still referring to FIG. 6A, memory 610 is shown to include a subplantcontrol module 628. Subplant control module 628 may store historicaldata regarding past operating statuses, past operating setpoints, andinstructions for calculating and/or implementing control parameters forsubplants 520-530. Subplant control module 628 may also receive, store,and/or transmit data regarding the conditions of individual devices ofthe subplant equipment, such as operating efficiency, equipmentdegradation, a date since last service, a lifespan parameter, acondition grade, or other device-specific data. Subplant control module628 may receive data from subplants 520-530 and/or BMS 606 viacommunications interface 636. Subplant control module 628 may alsoreceive and store on/off statuses and operating setpoints from low leveloptimizer 634.

Data and processing results from demand response optimizer 630, subplantcontrol module 628, or other modules of energy storage controller 506may be accessed by (or pushed to) monitoring and reporting applications626. Monitoring and reporting applications 626 may be configured togenerate real time “system health” dashboards that can be viewed andnavigated by a user (e.g., a system engineer). For example, monitoringand reporting applications 626 may include a web-based monitoringapplication with several graphical user interface (GUI) elements (e.g.,widgets, dashboard controls, windows, etc.) for displaying keyperformance indicators (KPI) or other information to users of a GUI. Inaddition, the GUI elements may summarize relative energy use andintensity across energy storage systems in different buildings (real ormodeled), different campuses, or the like. Other GUI elements or reportsmay be generated and shown based on available data that allow users toassess performance across one or more energy storage systems from onescreen. The user interface or report (or underlying data engine) may beconfigured to aggregate and categorize operating conditions by building,building type, equipment type, and the like. The GUI elements mayinclude charts or histograms that allow the user to visually analyze theoperating parameters and power consumption for the devices of the energystorage system.

Still referring to FIG. 6A, energy storage controller 506 may includeone or more GUI servers, web services 612, or GUI engines 614 to supportmonitoring and reporting applications 626. In various embodiments,applications 626, web services 612, and GUI engine 614 may be providedas separate components outside of energy storage controller 506 (e.g.,as part of a smart building manager). Energy storage controller 506 maybe configured to maintain detailed historical databases (e.g.,relational databases, XML databases, etc.) of relevant data and includescomputer code modules that continuously, frequently, or infrequentlyquery, aggregate, transform, search, or otherwise process the datamaintained in the detailed databases. Energy storage controller 506 maybe configured to provide the results of any such processing to otherdatabases, tables, XML files, or other data structures for furtherquerying, calculation, or access by, for example, external monitoringand reporting applications.

Energy storage controller 506 is shown to include configuration tools616. Configuration tools 616 can allow a user to define (e.g., viagraphical user interfaces, via prompt-driven “wizards,” etc.) how energystorage controller 506 should react to changing conditions in the energystorage subsystems. In an exemplary embodiment, configuration tools 616allow a user to build and store condition-response scenarios that cancross multiple energy storage system devices, multiple building systems,and multiple enterprise control applications (e.g., work ordermanagement system applications, entity resource planning applications,etc.). For example, configuration tools 616 can provide the user withthe ability to combine data (e.g., from subsystems, from eventhistories) using a variety of conditional logic. In varying exemplaryembodiments, the conditional logic can range from simple logicaloperators between conditions (e.g., AND, OR, XOR, etc.) to pseudo-codeconstructs or complex programming language functions (allowing for morecomplex interactions, conditional statements, loops, etc.).Configuration tools 616 can present user interfaces for building suchconditional logic. The user interfaces may allow users to definepolicies and responses graphically. In some embodiments, the userinterfaces may allow a user to select a pre-stored or pre-constructedpolicy and adapt it or enable it for use with their system.

Energy Cost Optimization Controller

Referring now to FIG. 6B, a block diagram illustrating controller 552 ingreater detail is shown, according to an exemplary embodiment.Controller 552 is shown providing control decisions to a buildingmanagement system (BMS) 606. In some embodiments, BMS 606 is the same orsimilar the BMS described with reference to FIG. 1. The controldecisions provided to BMS 606 may include resource purchase amounts forutilities 510 and/or setpoints for generator subplants 520.

BMS 606 may be configured to monitor conditions within a controlledbuilding or building zone. For example, BMS 606 may receive input fromvarious sensors (e.g., temperature sensors, humidity sensors, airflowsensors, voltage sensors, etc.) distributed throughout the building andmay report building conditions to controller 552. Building conditionsmay include, for example, a temperature of the building or a zone of thebuilding, a power consumption (e.g., electric load) of the building, astate of one or more actuators configured to affect a controlled statewithin the building, or other types of information relating to thecontrolled building. BMS 606 may operate subplants 520 to affect themonitored conditions within the building and to serve the thermal energyloads of the building.

BMS 606 may receive control signals from controller 552 specifyingon/off states and/or setpoints for the subplant equipment. BMS 606 maycontrol the equipment (e.g., via actuators, power relays, etc.) inaccordance with the control signals provided by controller 552. Forexample, BMS 606 may operate the equipment using closed loop control toachieve the setpoints specified by energy storage controller 552. Invarious embodiments, BMS 606 may be combined with controller 552 or maybe part of a separate building management system. According to anexemplary embodiment, BMS 606 is a METASYS® brand building managementsystem, as sold by Johnson Controls, Inc.

Controller 552 may monitor the status of the controlled building usinginformation received from BMS 606. Controller 552 may be configured topredict the thermal energy loads (e.g., heating loads, cooling loads,etc.) of the building for plurality of time steps in an optimizationperiod (e.g., using weather forecasts from a weather service 604).Controller 552 may generate control decisions that optimize the economicvalue of operating system 550 over the duration of the optimizationperiod subject to constraints on the optimization process (e.g., energybalance constraints, load satisfaction constraints, etc.). Theoptimization process performed by controller 552 is described in greaterdetail below.

Controller 552 is shown to include a communications interface 636 and aprocessing circuit 607 having a processor 608 and memory 610. Thesecomponents may be the same as described with reference to FIG. 6A. Forexample, controller 552 is shown to include demand response optimizer630. Demand response optimizer 630 may perform a cascaded optimizationprocess to optimize the performance of system 550. For example, demandresponse optimizer 630 is shown to include a high level optimizer 632and a low level optimizer 634. High level optimizer 632 may control anouter (e.g., subplant level) loop of the cascaded optimization. Highlevel optimizer 632 may determine an optimal set of control decisionsfor each time step in the prediction window in order to optimize (e.g.,maximize) the value of operating energy storage system 500. Controldecisions made by high level optimizer 632 may include, for example,load setpoints for each of generator subplants 520, resource purchaseamounts for each type of resource purchased from utilities 510, and/oran amount of each resource sold to energy purchasers 504. In otherwords, the control decisions may define resource allocation at each timestep.

Low level optimizer 634 may control an inner (e.g., equipment level)loop of the cascaded optimization. Low level optimizer 634 may determinehow to best run each subplant at the load setpoint determined by highlevel optimizer 632. For example, low level optimizer 634 may determineon/off states and/or operating setpoints for various devices of thesubplant equipment in order to optimize (e.g., minimize) the energyconsumption of each subplant while meeting the resource allocationsetpoint for the subplant. The cascaded optimization process performedby demand response optimizer 630 is described in greater detail in U.S.patent application Ser. No. 15/247,885. These and other components ofcontroller 552 may be the same as previously described with reference toFIG. 6A.

Planning Tool

Referring now to FIG. 7, a block diagram of a planning system 700 isshown, according to an exemplary embodiment. Planning system 700 may beconfigured to use demand response optimizer 630 as part of a planningtool 702 to simulate the operation of a central plant over apredetermined time period (e.g., a day, a month, a week, a year, etc.)for planning, budgeting, and/or design considerations. When implementedin planning tool 702, demand response optimizer 630 may operate in asimilar manner as described with reference to FIGS. 6A-6B. For example,demand response optimizer 630 may use building loads and utility ratesto determine an optimal resource allocation to minimize cost over asimulation period. However, planning tool 702 may not be responsible forreal-time control of a building management system or central plant.

Planning tool 702 can be configured to determine the benefits ofinvesting in a battery asset and the financial metrics associated withthe investment. Such financial metrics can include, for example, theinternal rate of return (IRR), net present value (NPV), and/or simplepayback period (SPP). Planning tool 702 can also assist a user indetermining the size of the battery which yields optimal financialmetrics such as maximum NPV or a minimum SPP. In some embodiments,planning tool 702 allows a user to specify a battery size andautomatically determines the benefits of the battery asset fromparticipating in selected IBDR programs while performing PBDR, asdescribed with reference to FIG. 5A. In some embodiments, planning tool702 is configured to determine the battery size that minimizes SPP giventhe IBDR programs selected and the requirement of performing PBDR. Insome embodiments, planning tool 702 is configured to determine thebattery size that maximizes NPV given the IBDR programs selected and therequirement of performing PBDR.

In planning tool 702, high level optimizer 632 may receive planned loadsand utility rates for the entire simulation period. The planned loadsand utility rates may be defined by input received from a user via aclient device 722 (e.g., user-defined, user selected, etc.) and/orretrieved from a plan information database 726. High level optimizer 632uses the planned loads and utility rates in conjunction with subplantcurves from low level optimizer 634 to determine an optimal resourceallocation (i.e., an optimal dispatch schedule) for a portion of thesimulation period.

The portion of the simulation period over which high level optimizer 632optimizes the resource allocation may be defined by a prediction windowending at a time horizon. With each iteration of the optimization, theprediction window is shifted forward and the portion of the dispatchschedule no longer in the prediction window is accepted (e.g., stored oroutput as results of the simulation). Load and rate predictions may bepredefined for the entire simulation and may not be subject toadjustments in each iteration. However, shifting the prediction windowforward in time may introduce additional plan information (e.g., plannedloads and/or utility rates) for the newly-added time slice at the end ofthe prediction window. The new plan information may not have asignificant effect on the optimal dispatch schedule since only a smallportion of the prediction window changes with each iteration.

In some embodiments, high level optimizer 632 requests all of thesubplant curves used in the simulation from low level optimizer 634 atthe beginning of the simulation. Since the planned loads andenvironmental conditions are known for the entire simulation period,high level optimizer 632 may retrieve all of the relevant subplantcurves at the beginning of the simulation. In some embodiments, lowlevel optimizer 634 generates functions that map subplant production toequipment level production and resource use when the subplant curves areprovided to high level optimizer 632. These subplant to equipmentfunctions may be used to calculate the individual equipment productionand resource use (e.g., in a post-processing module) based on theresults of the simulation.

Still referring to FIG. 7, planning tool 702 is shown to include acommunications interface 704 and a processing circuit 706.Communications interface 704 may include wired or wireless interfaces(e.g., jacks, antennas, transmitters, receivers, transceivers, wireterminals, etc.) for conducting data communications with varioussystems, devices, or networks. For example, communications interface 704may include an Ethernet card and port for sending and receiving data viaan Ethernet-based communications network and/or a WiFi transceiver forcommunicating via a wireless communications network. Communicationsinterface 704 may be configured to communicate via local area networksor wide area networks (e.g., the Internet, a building WAN, etc.) and mayuse a variety of communications protocols (e.g., BACnet, IP, LON, etc.).

Communications interface 704 may be a network interface configured tofacilitate electronic data communications between planning tool 702 andvarious external systems or devices (e.g., client device 722, resultsdatabase 728, plan information database 726, etc.). For example,planning tool 702 may receive planned loads and utility rates fromclient device 722 and/or plan information database 726 viacommunications interface 704. Planning tool 702 may use communicationsinterface 704 to output results of the simulation to client device 722and/or to store the results in results database 728.

Still referring to FIG. 7, processing circuit 706 is shown to include aprocessor 710 and memory 712. Processor 710 may be a general purpose orspecific purpose processor, an application specific integrated circuit(ASIC), one or more field programmable gate arrays (FPGAs), a group ofprocessing components, or other suitable processing components.Processor 710 may be configured to execute computer code or instructionsstored in memory 712 or received from other computer readable media(e.g., CDROM, network storage, a remote server, etc.).

Memory 712 may include one or more devices (e.g., memory units, memorydevices, storage devices, etc.) for storing data and/or computer codefor completing and/or facilitating the various processes described inthe present disclosure. Memory 712 may include random access memory(RAM), read-only memory (ROM), hard drive storage, temporary storage,non-volatile memory, flash memory, optical memory, or any other suitablememory for storing software objects and/or computer instructions. Memory712 may include database components, object code components, scriptcomponents, or any other type of information structure for supportingthe various activities and information structures described in thepresent disclosure. Memory 712 may be communicably connected toprocessor 710 via processing circuit 706 and may include computer codefor executing (e.g., by processor 710) one or more processes describedherein.

Still referring to FIG. 7, memory 712 is shown to include a GUI engine716, web services 714, and configuration tools 718. In an exemplaryembodiment, GUI engine 716 includes a graphical user interface componentconfigured to provide graphical user interfaces to a user for selectingor defining plan information for the simulation (e.g., planned loads,utility rates, environmental conditions, etc.). Web services 714 mayallow a user to interact with planning tool 702 via a web portal and/orfrom a remote system or device (e.g., an enterprise controlapplication).

Configuration tools 718 can allow a user to define (e.g., via graphicaluser interfaces, via prompt-driven “wizards,” etc.) various parametersof the simulation such as the number and type of subplants, the deviceswithin each subplant, the subplant curves, device-specific efficiencycurves, the duration of the simulation, the duration of the predictionwindow, the duration of each time step, and/or various other types ofplan information related to the simulation. Configuration tools 718 canpresent user interfaces for building the simulation. The user interfacesmay allow users to define simulation parameters graphically. In someembodiments, the user interfaces allow a user to select a pre-stored orpre-constructed simulated plant and/or plan information (e.g., from planinformation database 726) and adapt it or enable it for use in thesimulation.

Still referring to FIG. 7, memory 712 is shown to include demandresponse optimizer 630. Demand response optimizer 630 may use theplanned loads and utility rates to determine an optimal resourceallocation over a prediction window. The operation of demand responseoptimizer 630 may be the same or similar as previously described withreference to FIGS. 6-8. With each iteration of the optimization process,demand response optimizer 630 may shift the prediction window forwardand apply the optimal resource allocation for the portion of thesimulation period no longer in the prediction window. Demand responseoptimizer 630 may use the new plan information at the end of theprediction window to perform the next iteration of the optimizationprocess. Demand response optimizer 630 may output the applied resourceallocation to reporting applications 730 for presentation to a clientdevice 722 (e.g., via user interface 724) or storage in results database728.

Still referring to FIG. 7, memory 712 is shown to include reportingapplications 730. Reporting applications 730 may receive the optimizedresource allocations from demand response optimizer 630 and, in someembodiments, costs associated with the optimized resource allocations.Reporting applications 730 may include a web-based reporting applicationwith several graphical user interface (GUI) elements (e.g., widgets,dashboard controls, windows, etc.) for displaying key performanceindicators (KPI) or other information to users of a GUI. In addition,the GUI elements may summarize relative energy use and intensity acrossvarious plants, subplants, or the like. Other GUI elements or reportsmay be generated and shown based on available data that allow users toassess the results of the simulation. The user interface or report (orunderlying data engine) may be configured to aggregate and categorizeresource allocation and the costs associated therewith and provide theresults to a user via a GUI. The GUI elements may include charts orhistograms that allow the user to visually analyze the results of thesimulation. An exemplary output that may be generated by reportingapplications 730 is shown in FIG. 8.

Referring now to FIG. 8, several graphs 800 illustrating the operationof planning tool 702 are shown, according to an exemplary embodiment.With each iteration of the optimization process, planning tool 702selects an optimization period (i.e., a portion of the simulationperiod) over which the optimization is performed. For example, planningtool 702 may select optimization period 802 for use in the firstiteration. Once the optimal resource allocation 810 has been determined,planning tool 702 may select a portion 818 of resource allocation 810 tosend to plant dispatch 830. Portion 818 may be the first b time steps ofresource allocation 810. Planning tool 702 may shift the optimizationperiod 802 forward in time, resulting in optimization period 804. Theamount by which the prediction window is shifted may correspond to theduration of time steps b.

Planning tool 702 may repeat the optimization process for optimizationperiod 804 to determine the optimal resource allocation 812. Planningtool 702 may select a portion 820 of resource allocation 812 to send toplant dispatch 830. Portion 820 may be the first b time steps ofresource allocation 812. Planning tool 702 may then shift the predictionwindow forward in time, resulting in optimization period 806. Thisprocess may be repeated for each subsequent optimization period (e.g.,optimization periods 806, 808, etc.) to generate updated resourceallocations (e.g., resource allocations 814, 816, etc.) and to selectportions of each resource allocation (e.g., portions 822, 824) to sendto plant dispatch 830. Plant dispatch 830 includes the first b timesteps 818-824 from each of optimization periods 802-808. Once theoptimal resource allocation is compiled for the entire simulationperiod, the results may be sent to reporting applications 730, resultsdatabase 728, and/or client device 722, as described with reference toFIG. 7.

Resource Allocation Optimization

Referring now to FIG. 9, a block diagram illustrating high leveloptimizer 632 in greater detail is shown, according to an exemplaryembodiment. In some embodiments, high level optimizer 632 may beimplemented as a component of energy storage controller 506, asdescribed with reference to FIGS. 5A and 6A. In other embodiments, highlevel optimizer 632 may be implemented as a component of controller 552,as described with reference to FIGS. 5B and 6B. In other embodiments,high level optimizer 632 may be implemented as a component of planningtool 702, as described with reference to FIGS. 7-8.

High level optimizer 632 may receive load and rate predictions fromload/rate predictor 622, incentive predictions from incentive estimator620, and subplant curves from low level optimizer 634. High leveloptimizer 632 may determine an optimal resource allocation across energystorage system 500 as a function of the load and rate predictions, theincentive predictions, and the subplant curves. The optimal resourceallocation may include an amount of each resource purchased fromutilities 510, an amount of each input and output resource of generatorsubplants 520, an amount of each resource stored or withdrawn fromstorage subplants 530, and/or an amount of each resource sold to energypurchasers 504. In some embodiments, the optimal resource allocationmaximizes the economic value of operating energy storage system 500while satisfying the predicted loads for the building or campus.

High level optimizer 632 can be configured to optimize the utilizationof a battery asset, such as battery 108, battery 306, and/or electricalenergy storage subplant 533. A battery asset can be used to participatein IBDR programs which yield revenue and to reduce the cost of energyand the cost incurred from peak load contribution charges. High leveloptimizer 632 can use an optimization algorithm to optimally allocate abattery asset (e.g., by optimally charging and discharging the battery)to maximize its total value. In a planning tool framework, high leveloptimizer 632 can perform the optimization iteratively to determineoptimal battery asset allocation for an entire simulation period (e.g.,an entire year), as described with reference to FIG. 8. The optimizationprocess can be expanded to include economic load demand response (ELDR)and can account for peak load contribution charges. High level optimizer632 can allocate the battery asset at each time step (e.g., each hour)over a given horizon such that energy and demand costs are minimized andfrequency regulation (FR) revenue maximized. These and other features ofhigh level optimizer 632 are described in detail below.

Cost Function

Still referring to FIG. 9, high level optimizer 632 is shown to includea cost function module 902. Cost function module 902 can generate a costfunction or objective function which represents the total operating costof a system over a time horizon (e.g., one month, one year, one day,etc.). The system can include any of the systems previously described(e.g., frequency response optimization system 100, photovoltaic energysystem 300, energy storage system 500, planning system 700, etc.) or anyother system in which high level optimizer 632 is implemented. In someembodiments, the cost function can be expressed generically using thefollowing equation:

$\underset{x}{\arg \; \min}\; {J(x)}$

where J(x) is defined as follows:

${J(x)} = {{\sum\limits_{sources}{\sum\limits_{horizon}{{cost}\left( {{purchase}_{{resource},{tme}},{time}} \right)}}} - {\sum\limits_{incentives}{\sum\limits_{horizon}{{revenue}({ReservationAmount})}}}}$

The first term in the previous equation represents the total cost of allresources purchased over the optimization horizon. Resources caninclude, for example, water, electricity, natural gas, or other types ofresources purchased from a utility or other outside entity. The secondterm in the equation represents the total revenue generated byparticipating in incentive programs (e.g., IBDR programs) over theoptimization horizon. The revenue may be based on the amount of powerreserved for participating in the incentive programs. Accordingly, thetotal cost function represents the total cost of resources purchasedminus any revenue generated from participating in incentive programs.

High level optimizer 632 can optimize the cost function J(x) subject tothe following constraint, which guarantees the balance between resourcespurchased, produced, discharged, consumed, and requested over theoptimization horizon:

${{\sum\limits_{sources}{purchase}_{{resource},{tme}}} + {\sum\limits_{subplants}{{produces}\left( {x_{{internal},{time}},x_{{external},{time}},v_{{uncontrolled},{time}}} \right)}} - {\sum\limits_{subplants}{{consumes}\left( {x_{{internal},{time}},x_{{external},{time}},v_{{uncontrolled},{time}}} \right)}} + {\sum\limits_{storages}{{discharges}_{resources}\left( {x_{{internal},{time}},x_{{external},{time}}} \right)}} - {\sum\limits_{sinks}{requests}_{resource}}} = 0$  ∀resources, ∀time ∈ horizon

where x_(internal,time) and x_(external,time) are internal and externaldecision variables and v_(uncontrolled,time) includes uncontrolledvariables.

The first term in the previous equation represents the total amount ofeach resource (e.g., electricity, water, natural gas, etc.) purchasedfrom each source (e.g., utilities 510) over the optimization horizon.The second term represents the total consumption of each resource withinthe system (e.g., by generator subplants 520) over the optimizationhorizon. The third term represents the total amount of each resourcedischarged from storage (e.g., storage subplants 530) over theoptimization horizon. Positive values indicate that the resource isdischarged from storage, whereas negative values indicate that theresource is charged or stored. The fourth term represents the totalamount of each resource requested by various resource sinks (e.g.,building 502, energy purchasers 504, or other resource consumers) overthe optimization horizon. Accordingly, this constraint ensures that thetotal amount of each resource purchased, produced, or discharged fromstorage is equal to the amount of each resource consumed, stored, orprovided to the resource sinks.

In some embodiments, cost function module 902 separates the purchasecost of one or more resources into multiple terms. For example, costfunction module 902 can separate the purchase cost of a resource into afirst term corresponding to the cost per unit of the resource purchased(e.g., $/kWh of electricity, $/liter of water, etc.) and a second termcorresponding to one or more demand charges. A demand charge is aseparate charge on the consumption of a resource which depends on themaximum or peak resource consumption over a given period (i.e., a demandcharge period). Cost function module 902 can express the cost functionusing the following equation:

${J(x)} = {{\sum\limits_{s \in {sources}}\left\lbrack {{\sum\limits_{q \in {demands}_{s}}^{\;}{w_{{demand},s,q}r_{{demand},s,q}{\max\limits_{i \in {demand}_{s,q}}\left( {purchase}_{s,i} \right)}}} + {\sum\limits_{horizon}{r_{s,i}{purchase}_{s,i}}}} \right\rbrack} - {\sum\limits_{incentives}{\sum\limits_{horizon}{{revenue}({ReservationAmount})}}}}$

where r_(demand,s,q) is the qth demand charge associated with the peakdemand of the resource provided by source s over the demand chargeperiod, w_(demand,s,q) is the weight adjustment of the qth demand chargeassociated with source s, and the max( ) term indicates the maximumamount of the resource purchased from source s at any time step i duringthe demand charge period. The variable r_(s,i) indicates the cost perunit of the resource purchased from source s and the variablepurchase_(s,i) indicates the amount of the resource purchased fromsource s during the ith time step of the optimization period.

In some embodiments, the energy system in which high level optimizer 632is implemented includes a battery asset (e.g., one or more batteries)configured to store and discharge electricity. If the battery asset isthe only type of energy storage, cost function module 902 can simplifythe cost function J(x) to the following equation:

${J(x)} = {{- {\sum\limits_{i = k}^{k + h - 1}{r_{e_{i}}P_{{bat}_{i}}}}} - {\sum\limits_{i = k}^{k + h - 1}{r_{{FR}_{i}}P_{{FR}_{i}}}} + {\sum\limits_{i = k}^{k + h - 1}{r_{s_{i}}{{P_{{bat}_{i}} - P_{{bat}_{i - 1}}}}}} + {w_{d}r_{d}{\max\limits_{i}\left( {{- P_{{bat}_{i}}} + {eLoad}_{i}} \right)}}}$

where h is the duration of the optimization horizon, P_(bat) _(i) is theamount of power (e.g., kW) discharged from the battery asset during theith time step of the optimization horizon for use in reducing the amountof power purchased from an electric utility, r_(e) _(i) is the price ofelectricity (e.g., $/kWh) at time step i, P_(FR,i) is the battery power(e.g., kW) committed to frequency regulation participation during timestep i, r_(FR) _(i) is the incentive rate (e.g., $/kWh) forparticipating in frequency regulation during time step i, r_(d) is theapplicable demand charge (e.g., $/kWh) associated with the maximumelectricity consumption during the corresponding demand charge period,w_(d) is a weight adjustment of the demand charge over the horizon, andthe max( ) term selects the maximum amount electricity purchased fromthe electric utility (e.g., kW) during any time step i of the applicabledemand charge period.

In the previous expression of the cost function J(x), the first termrepresents the cost savings resulting from the use of battery power tosatisfy the electric demand of the facility relative to the cost whichwould have been incurred if the electricity were purchased from theelectric utility. The second term represents the amount of revenuederived from participating in the frequency regulation program. Thethird term represents a switching penalty imposed for switching thebattery power P_(bat) between consecutive time steps. The fourth termrepresents the demand charge associated with the maximum amount ofelectricity purchased from the electric utility. The amount ofelectricity purchased may be equal to the difference between theelectric load of the facility eLoad_(i) (i.e., the total amount ofelectricity required) at time step i and the amount of power dischargedfrom the battery asset P_(bat) _(i) at time step i. In a planning toolframework, historical data of the electric load eLoad over the horizoncan be provided as a known input. In an operational mode, the electricload eLoad can be predicted for each time step of the optimizationperiod.

Optimization Constraints

Still referring to FIG. 9, high level optimizer 632 is shown to includea power constraints module 904. Power constraints module 904 may beconfigured to impose one or more power constraints on the objectivefunction J(x). In some embodiments, power constraints module 904generates and imposes the following constraints:

P _(bat) _(i) +P _(FR) _(i) ≤P _(eff)

−P _(bat) _(i) +P _(FR) _(i) ≤P _(eff)

P _(bat) _(i) +P _(FR) _(i) ≤eLoad_(i)

where P_(bat) _(i) is the amount of power discharged from the battery attime step i for use in satisfying electric demand and reducing thedemand charge, P_(FR) _(i) is the amount of battery power committed tofrequency regulation at time step i, P_(eff) is the effective poweravailable (e.g., the maximum rate at which the battery can be charged ordischarged), and eLoad_(i) is the total electric demand at time step i.

The first two power constraints ensure that the battery is not chargedor discharged at a rate that exceeds the maximum batterycharge/discharge rate P_(eff). If the system includes photovoltaic (PV)power generation, the effective power available P_(eff) can becalculated as follows:

P _(eff) =P _(rated) −P _(PV FirmingReserve)

where P_(rated) is the rated capacity of the battery andP_(PV FirmingReserve) is the PV firming reserve power. The third powerconstraint ensures that energy stored in the battery is not sold orexported to the energy grid. In some embodiments, power constraintsmodule 904 can remove the third power constraint if selling energy backto the energy grid is a desired feature or behavior of the system.

Still referring to FIG. 9, high level optimizer 632 is shown to includea capacity constraints module 906. Capacity constraints module 906 maybe configured to impose one or more capacity constraints on theobjective function J(x). The capacity constraints may be used to relatethe battery power P_(bat) charged or discharged during each time step tothe capacity and state-of-charge (SOC) of the battery. The capacityconstraints may ensure that the SOC of the battery is maintained withinacceptable lower and upper bounds and that sufficient battery capacityis available for frequency regulation. In some embodiments, the lowerand upper bounds are based on the battery capacity needed to reserve theamount of power committed to frequency regulation P_(FR) _(i) duringeach time step i.

In some embodiments, capacity constraints module 906 generates two setsof capacity constraints. One set of capacity constraints may apply tothe boundary condition at the end of each time step i, whereas the otherset of capacity constraints may apply to the boundary condition at thebeginning of the next time step i+1. For example, if a first amount ofbattery capacity is reserved for frequency regulation during time step iand a second amount of battery capacity is reserved for frequencyregulation during time step i+1, the boundary point between time step iand i+1 may be required to satisfy the capacity constraints for bothtime step i and time step i+1. This ensures that the decisions made forthe power committed to frequency regulation during the current time stepi and the next time step i+1 represent a continuous change in the SOC ofthe battery.

In some embodiments, capacity constraints module 906 generates thefollowing capacity constraints:

$\left\{ {{\begin{matrix}{{C_{a} - {\sum\limits_{n = k}^{i}P_{{bat}_{n}}}} \leq {C_{eff} - {C_{FR}P_{{FR}_{i}}}}} \\{{C_{a} - {\sum\limits_{n = k}^{i}P_{{bat}_{n}}}} \geq {C_{FR}P_{{FR}_{i}}}}\end{matrix}{\forall i}} = {{k\mspace{11mu} \ldots \mspace{11mu} k} + h - {1\left\{ {{\begin{matrix}{{C_{a} - {\sum\limits_{n = k}^{i}P_{{bat}_{n}}}} \leq {C_{eff} - {C_{FR}P_{{FR}_{i + 1}}}}} \\{{C_{a} - {\sum\limits_{n = k}^{i}P_{{bat}_{n}}}} \geq {C_{FR}P_{{FR}_{i + 1}}}}\end{matrix}{\forall i}} = {{k\mspace{11mu} \ldots \mspace{11mu} k} + h - 2}} \right.}}} \right.$

where C_(a) is the available battery capacity (e.g., kWh), C_(FR) is thefrequency regulation reserve capacity (e.g., kWh/kW) which translatesthe amount of battery power committed to frequency regulation P_(FR)into an amount of energy needed to be reserved, and C_(eff) is theeffective capacity of the battery.

The first set of constraints ensures that the battery capacity at theend of each time step i (i.e., available capacity C_(a) minus thebattery power discharged through time step i) is maintained between thelower capacity bound C_(FR)P_(FR) _(i) and the upper capacity boundC_(eff)−C_(FR)P_(FR) _(i) for time step i. The lower capacity boundC_(FR)P_(FR) _(i) represents the minimum capacity required to reserveP_(FR) _(i) for frequency regulation during time step i, whereas theupper capacity bound C_(eff)−C_(FR)P_(FR) _(i) represents maximumcapacity required to reserve P_(FR) _(i) for frequency regulation duringtime step i. Similarly, the second set of constraints ensures that thebattery capacity at the end of each time step i (i.e., availablecapacity C_(a) minus the battery power discharged through time step i)is maintained between the lower capacity bound C_(FR)P_(FR) _(i+1) andthe upper capacity bound C_(eff)−C_(FR)P_(FR) _(i+1) for time step i+1.The lower capacity bound C_(FR)P_(FR) _(i+1) represents the minimumcapacity required to reserve P_(FR) _(i+1) for frequency regulationduring time step i+1, whereas the upper capacity boundC_(eff)−C_(FR)P_(FR) _(i+1) represents maximum capacity required toreserve P_(FR) _(i+1) for frequency regulation during time step i+1.

In some embodiments, capacity constraints module 906 calculates theeffective capacity of the battery C_(eff) as a percentage of the ratedcapacity of the battery. For example, if frequency regulation andphotovoltaic power generation are both enabled and the SOC controlmargin is non-zero, capacity constraints module 906 can calculate theeffective capacity of the battery C_(eff) using the following equation:

C _(eff)=(1−C _(FR)−2C _(socCM))C _(rated) −C _(PV FirmingReserve)

where C_(socCM) is the control margin and C_(PV FirmingReserve) is thecapacity reserved for photovoltaic firming.

Still referring to FIG. 9, high level optimizer 632 is shown to includea switching constraints module 908. Switching constraints module 908 maybe configured to impose one or more switching constraints on the costfunction J(x). As previously described, the cost function J(x) mayinclude the following switching term:

$\sum\limits_{i = k}^{k + h - 1}{r_{s_{i}}{{P_{{bat}_{i}} - P_{{bat}_{i - 1}}}}}$

which functions as a penalty for switching the battery power P_(bat)between consecutive time steps i and i−1. Notably, the switching term isnonlinear as a result of the absolute value function.

Switching constraints module 908 can impose constraints which representthe nonlinear switching term in a linear format. For example, switchingconstraints module 908 can introduce an auxiliary switching variables_(i) and constrain the auxiliary switching variable to be greater thanthe difference between the battery power P_(bat) _(i) at time step i andthe battery power P_(bat) _(i−1) at time step i−1, as shown in thefollowing equations:

s _(i) >P _(bat) _(i) −P _(bat) _(i−1)

s _(i) >P _(bat) _(i−1) −P _(bat) _(i) ∀i=k . . . k+h−1

Switching constraints module 908 can replace the nonlinear switchingterm in the cost function J(x) with the following linearized term:

$\sum\limits_{i = k}^{k + h - 1}{r_{s_{i}}s_{i}}$

which can be optimized using any of a variety of linear optimizationtechniques (e.g., linear programming) subject to the constraints on theauxiliary switching variable s_(i).

Demand Charge Incorporation

Still referring to FIG. 9, high level optimizer 632 is shown to includea demand charge module 910. Demand charge module 910 can be configuredto modify the cost function J(x) and the optimization constraints toaccount for one or more demand charges. As previously described, demandcharges are costs imposed by utilities 510 based on the peak consumptionof a resource from utilities 510 during various demand charge periods(i.e., the peak amount of the resource purchased from the utility duringany time step of the applicable demand charge period). For example, anelectric utility may define one or more demand charge periods and mayimpose a separate demand charge based on the peak electric consumptionduring each demand charge period. Electric energy storage can helpreduce peak consumption by storing electricity in a battery when energyconsumption is low and discharging the stored electricity from thebattery when energy consumption is high, thereby reducing peakelectricity purchased from the utility during any time step of thedemand charge period.

In some instances, one or more of the resources purchased from utilities510 are subject to a demand charge or multiple demand charges. There aremany types of potential demand charges as there are different types ofenergy rate structures. The most common energy rate structures areconstant pricing, time of use (TOU), and real time pricing (RTP). Eachdemand charge may be associated with a demand charge period during whichthe demand charge is active. Demand charge periods can overlap partiallyor completely with each other and/or with the optimization period.Demand charge periods can include relatively long periods (e.g.,monthly, seasonal, annual, etc.) or relatively short periods (e.g.,days, hours, etc.). Each of these periods can be divided into severalsub-periods including off-peak, partial-peak, and/or on-peak. Somedemand charge periods are continuous (e.g., beginning Jan. 1, 2017 andending Jan. 31, 2017), whereas other demand charge periods arenon-continuous (e.g., from 11:00 AM-1:00 PM each day of the month).

Over a given optimization period, some demand charges may be activeduring some time steps that occur within the optimization period andinactive during other time steps that occur during the optimizationperiod. Some demand charges may be active over all the time steps thatoccur within the optimization period. Some demand charges may apply tosome time steps that occur during the optimization period and other timesteps that occur outside the optimization period (e.g., before or afterthe optimization period). In some embodiments, the durations of thedemand charge periods are significantly different from the duration ofthe optimization period.

Advantageously, demand charge module 910 may be configured to accountfor demand charges in the high level optimization process performed byhigh level optimizer 632. In some embodiments, demand charge module 910incorporates demand charges into the optimization problem and the costfunction J(x) using demand charge masks and demand charge rate weightingfactors. Each demand charge mask may correspond to a particular demandcharge and may indicate the time steps during which the correspondingdemand charge is active and/or the time steps during which the demandcharge is inactive. Each rate weighting factor may also correspond to aparticular demand charge and may scale the corresponding demand chargerate to the time scale of the optimization period.

As described above, the demand charge term of the cost function J(x) canbe expressed as:

${J(x)} = {\ldots \; {\sum\limits_{s \in {sources}}{\sum\limits_{q \in {demands}_{s}}^{\;}{w_{{demand},s,q}r_{{demand},s,q}{\max\limits_{i \in {demand}_{s,q}}{\left( {purchase}_{s,i} \right)\mspace{11mu} \ldots}}}}}}$

where the max( ) function selects the maximum amount of the resourcepurchased from source s during any time step i that occurs during theoptimization period. However, the demand charge period associated withdemand charge q may not cover all of the time steps that occur duringthe optimization period. In order to apply the demand charge q to onlythe time steps during which the demand charge q is active, demand chargemodule 910 can add a demand charge mask to the demand charge term asshown in the following equation:

${J(x)} = {\ldots \; {\sum\limits_{s \in {sources}}{\sum\limits_{q \in {demands}_{s}}^{\;}{w_{{demand},s,q}r_{{demand},s,q}{\max\limits_{i \in {demand}_{s,q}}{\left( {g_{s,q,i}{purchase}_{s,i}} \right)\mspace{11mu} \ldots}}}}}}$

where g_(s,q,i) is an element of the demand charge mask.

The demand charge mask may be a logical vector including an elementg_(s,q,i) for each time step i that occurs during the optimizationperiod. Each element g_(s,q,i) of the demand charge mask may include abinary value (e.g., a one or zero) that indicates whether the demandcharge q for source s is active during the corresponding time step i ofthe optimization period. For example, the element g_(s,q,i) may have avalue of one (i.e., g_(s,q,i)=1) if demand charge q is active duringtime step i and a value of zero (i.e., g_(s,q,i)=0) if demand charge qis inactive during time step i. An example of a demand charge mask isshown in the following equation:

g _(s,q)=[0,0,0,1,1,1,1,0,0,0,1,1]^(T)

where g_(s,q,1), g_(s,q,2), g_(s,q,3), g_(s,q,8), g_(s,q,9), andg_(s,q,10) have values of zero, whereas g_(s,q,4), g_(s,q,5), g_(s,q,6),g_(s,q,7), g_(s,q,11), and g_(s,q,12) have values of one. This indicatesthat the demand charge q is inactive during time steps i=1, 2, 3, 8, 9,10 (i.e., g_(s,q,i)=0 ∀i=1, 2, 3, 8, 9, 10) and active during time stepsi=4, 5, 6, 7, 11, 12 (i.e., g_(s,q,i)=1 ∀i=4, 5, 6, 7, 11, 12).Accordingly, the term g_(s,q,i)purchase_(s,i) within the max( ) functionmay have a value of zero for all time steps during which the demandcharge q is inactive. This causes the max( ) function to select themaximum purchase from source s that occurs during only the time stepsfor which the demand charge q is active.

In some embodiments, demand charge module 910 calculates the weightingfactor w_(demand,s,q) for each demand charge q in the cost functionJ(x). The weighting factor w_(demand,s,q) may be a ratio of the numberof time steps the corresponding demand charge q is active during theoptimization period to the number of time steps the corresponding demandcharge q is active in the remaining demand charge period (if any) afterthe end of the optimization period. For example, demand charge module910 can calculate the weighting factor w_(demand,s,q) using thefollowing equation:

$w_{{demand},s,q} = \frac{\sum_{i = k}^{k + h - 1}\; g_{s,q,i}}{\sum_{i = {k + h}}^{{period}\_ {end}}\; g_{s,q,i}}$

where the numerator is the summation of the number of time steps thedemand charge q is active in the optimization period (i.e., from timestep k to time step k+h−1) and the denominator is the number of timesteps the demand charge q is active in the portion of the demand chargeperiod that occurs after the optimization period (i.e., from time stepk+h to the end of the demand charge period). The following exampleillustrates how demand charge module 910 can incorporate multiple demandcharges into the cost function J(x). In this example, a single source ofelectricity (e.g., an electric grid) is considered with multiple demandcharges applicable to the electricity source (i.e., a=1 . . . N, where Nis the total number of demand charges). The system includes a batteryasset which can be allocated over the optimization period by charging ordischarging the battery during various time steps. Charging the batteryincreases the amount of electricity purchased from the electric grid,whereas discharging the battery decreases the amount of electricitypurchased from the electric grid.

Demand charge module 910 can modify the cost function J(x) to accountfor the N demand charges as shown in the following equation:

${J(x)} = {\ldots + {w_{d_{1}}r_{d_{1}}{\max\limits_{i}\left( {g_{1_{i}}\left( {{- P_{{bat}_{i}}} + {eLoad}_{i}} \right)} \right)}} + \ldots + {w_{d_{q}}r_{d_{q}}{\max\limits_{i}\left( {g_{q_{i}}\left( {{- P_{{bat}_{i}}} + {eLoad}_{i}} \right)} \right)}} + \ldots + {w_{d_{N}}r_{d_{N}}{\max\limits_{i}\left( {g_{N_{i}}\left( {{- P_{{bat}_{i}}} + {eLoad}_{i}} \right)} \right)}}}$

where the term −P_(bat) _(i) eLoad_(i) represents the total amount ofelectricity purchased from the electric grid during time step i (i.e.,the total electric load eLoad_(i) minus the power discharged from thebattery P_(bat) _(i) ). Each demand charge a=1 . . . N can be accountedfor separately in the cost function J(x) by including a separate max( )function for each of the N demand charges. The parameter r_(d) _(q)indicates the demand charge rate associated with the qth demand charge(e.g., $/kW) and the weighting factor w_(d) _(q) indicates the weightapplied to the qth demand charge.

Demand charge module 910 can augment each max( ) function with anelement g_(q) _(i) of the demand charge mask for the correspondingdemand charge. Each demand charge mask may be a logical vector of binaryvalues which indicates whether the corresponding demand charge is activeor inactive at each time step i of the optimization period. Accordingly,each max( ) function may select the maximum electricity purchase duringonly the time steps the corresponding demand charge is active. Each max() function can be multiplied by the corresponding demand charge rater_(d) _(q) and the corresponding demand charge weighting factor w_(d)_(q) to determine the total demand charge resulting from the batteryallocation P_(bat) over the duration of the optimization period.

In some embodiments, demand charge module 910 linearizes the demandcharge terms of the cost function J(x) by introducing an auxiliaryvariable d_(q) for each demand charge q. In the case of the previousexample, this will result in N auxiliary variables d₁ . . . d_(N) beingintroduced as decision variables in the cost function J(x). Demandcharge module 910 can modify the cost function J(x) to include thelinearized demand charge terms as shown in the following equation:

J(x)= . . . +w _(d) ₁ r _(d) ₁ d ₁ + . . . +w _(d) _(q) r _(d) _(q) d_(q) + . . . +w _(d) _(N) r _(d) _(N) d _(N)

Demand charge module 910 can impose the following constraints on theauxiliary demand charge variables d₁ . . . d_(N) to ensure that eachauxiliary demand charge variable represents the maximum amount ofelectricity purchased from the electric utility during the applicabledemand charge period:

$\begin{matrix}{d_{1} \geq {g_{1_{i}}\left( {{- P_{{bat}_{i}}} + {eLoad}_{i}} \right)}} & {{{\forall i} = {{k\mspace{14mu} \ldots \mspace{14mu} k} + h - 1}},} & {g_{1_{i}} \neq 0} \\\; & {d_{1} \geq 0} & \vdots \\{d_{q} \geq {g_{q_{i}}\left( {{- P_{{bat}_{i}}} + {eLoad}_{i}} \right)}} & {{{\forall i} = {{k\mspace{14mu} \ldots \mspace{14mu} k} + h - 1}},} & {g_{q_{i}} \neq 0} \\\; & {d_{q} \geq 0} & \vdots \\{d_{N} \geq {g_{N_{i}}\left( {{- P_{{bat}_{i}}} + {eLoad}_{i}} \right)}} & {{{\forall i} = {{k\mspace{14mu} \ldots \mspace{14mu} k} + h - 1}},} & {g_{N_{i}} \neq 0} \\\; & {d_{N} \geq 0} & \;\end{matrix}$

In some embodiments, the number of constraints corresponding to eachdemand charge q is dependent on how many time steps the demand charge qis active during the optimization period. For example, the number ofconstraints for the demand charge q may be equal to the number ofnon-zero elements of the demand charge mask g_(q). Furthermore, thevalue of the auxiliary demand charge variable d_(q) at each iteration ofthe optimization may act as the lower bound of the value of theauxiliary demand charge variable d_(q) at the following iteration.

Consider the following example of a multiple demand charge structure. Inthis example, an electric utility imposes three monthly demand charges.The first demand charge is an all-time monthly demand charge of 15.86$/kWh which applies to all hours within the entire month. The seconddemand charge is an on-peak monthly demand charge of 1.56 $/kWh whichapplies each day from 12:00-18:00. The third demand charge is apartial-peak monthly demand charge of 0.53 $/kWh which applies each dayfrom 9:00-12:00 and from 18:00-22:00.

For an optimization period of one day and a time step of one hour (i.e.,i=1 . . . 24), demand charge module 910 may introduce three auxiliarydemand charge variables. The first auxiliary demand charge variable d₁corresponds to the all-time monthly demand charge; the second auxiliarydemand charge variable d₂ corresponds to the on-peak monthly demandcharge; and the third auxiliary demand charge variable d₃ corresponds tothe partial-peak monthly demand charge. Demand charge module 910 canconstrain each auxiliary demand charge variable to be greater than orequal to the maximum electricity purchase during the hours thecorresponding demand charge is active, using the inequality constraintsdescribed above.

Demand charge module 910 can generate a demand charge mask g_(q) foreach of the three demand charges (i.e., q=1 . . . 3), where g_(q)includes an element for each time step of the optimization period (i.e.,g_(q)=[g_(q) ₁ . . . g_(q) ₂₄ ]). The three demand charge masks can bedefined as follows:

g ₁ _(i) =1 ∀i=1 . . . 24

g ₂ _(i) =1 ∀i=12 . . . 18

g ₃ _(i) =1 ∀i=9 . . . 12,18 . . . 22

with all other elements of the demand charge masks equal to zero. Inthis example, it is evident that more than one demand charge constraintwill be active during the hours which overlap with multiple demandcharge periods. Also, the weight of each demand charge over theoptimization period can vary based on the number of hours the demandcharge is active, as previously described.

In some embodiments, demand charge module 910 considers severaldifferent demand charge structures when incorporating multiple demandcharges into the cost function J(x) and optimization constraints. Demandcharge structures can vary from one utility to another, or the utilitymay offer several demand charge options. In order to incorporate themultiple demand charges within the optimization framework, agenerally-applicable framework can be defined as previously described.Demand charge module 910 can translate any demand charge structure intothis framework. For example, demand charge module 910 can characterizeeach demand charge by rates, demand charge period start, demand chargeperiod end, and active hours. Advantageously, this allows demand chargemodule 910 to incorporate multiple demand charges in agenerally-applicable format.

The following is another example of how demand charge module 910 canincorporate multiple demand charges into the cost function J(x).Consider, for example, monthly demand charges with all-time, on-peak,partial-peak, and off-peak. In this case, there are four demand chargestructures, where each demand charge is characterized by twelve monthlyrates, twelve demand charge period start (e.g., beginning of eachmonth), twelve demand charge period end (e.g., end of each month), andhoursActive. The hoursActive is a logical vector where the hours over ayear where the demand charge is active are set to one. When running theoptimization over a given horizon, demand charge module 910 canimplement the applicable demand charges using the hoursActive mask, therelevant period, and the corresponding rate.

In the case of an annual demand charge, demand charge module 910 can setthe demand charge period start and period end to the beginning and endof a year. For the annual demand charge, demand charge module 910 canapply a single annual rate. The hoursActive demand charge mask canrepresent the hours during which the demand charge is active. For anannual demand charge, if there is an all-time, on-peak, partial-peak,and/or off-peak, this translates into at most four annual demand chargeswith the same period start and end, but different hoursActive anddifferent rates.

In the case of a seasonal demand charge (e.g., a demand charge for whichthe maximum peak is determined over the indicated season period), demandcharge module 910 can represent the demand charge as an annual demandcharge. Demand charge module 910 can set the demand charge period startand end to the beginning and end of a year. Demand charge module 910 canset the hoursActive to one during the hours which belong to the seasonand to zero otherwise. For a seasonal demand charge, if there is anAll-time, on-peak, partial, and/or off-peak, this translates into atmost four seasonal demand charges with the same period start and end,but different hoursActive and different rates.

In the case of the average of the maximum of current month and theaverage of the maxima of the eleven previous months, demand chargemodule 910 can translate the demand charge structure into a monthlydemand charge and an annual demand charge. The rate of the monthlydemand charge may be half of the given monthly rate and the annual ratemay be the sum of given monthly rates divided by two.

Incentive Program Incorporation

Referring again to FIG. 9, high level optimizer 632 is shown to includean incentive program module 912. Incentive program module 912 may modifythe optimization problem to account for revenue from participating in anincentive-based demand response (IBDR) program. IBDR programs mayinclude any type of incentive-based program that provides revenue inexchange for resources (e.g., electric power) or a reduction in a demandfor such resources. For example, energy storage system 500 may provideelectric power to an energy grid or an independent service operator aspart of a frequency response program (e.g., PJM frequency response) or asynchronized reserve market. In a frequency response program, aparticipant contracts with an electrical supplier to maintain reservepower capacity that can be supplied or removed from an energy grid bytracking a supplied signal. The participant is paid by the amount ofpower capacity required to maintain in reserve. In other types of IBDRprograms, energy storage system 500 may reduce its demand for resourcesfrom a utility as part of a load shedding program. It is contemplatedthat energy storage system 500 may participate in any number and/or typeof IBDR programs.

In some embodiments, incentive program module 912 modifies the costfunction J(x) to include revenue generated from participating in aneconomic load demand response (ELDR) program. ELDR is a type of IBDRprogram and similar to frequency regulation. In ELDR, the objective isto maximize the revenue generated by the program, while using thebattery to participate in other programs and to perform demandmanagement and energy cost reduction. To account for ELDR programparticipation, incentive program module 912 can modify the cost functionJ(x) to include the following term:

$\min\limits_{b_{i},P_{{bat}_{i}}}\left( {- {\sum\limits_{i = k}^{k + h - 1}\; {b_{i}{r_{{ELDR}_{i}}\left( {{adjCBL}_{i} - \left( {{eLoad}_{i} - {P_{bat}}_{i}} \right)} \right)}}}} \right)$

where b_(i) is a binary decision variable indicating whether toparticipate in the ELDR program during time step i, r_(ELDR) _(i) is theELDR incentive rate at which participation is compensated, andadjCBL_(i) is the symmetric additive adjustment (SAA) on the baselineload. The previous expression can be rewritten as:

$\min\limits_{b_{i},P_{{bat}_{i}}}\left( {- {\sum\limits_{i = k}^{k + h - 1}\; {b_{i}{r_{{ELDR}_{i}}\left( {{\sum\limits_{l = 1}^{4}\; \frac{e_{li}}{4}} + {\sum\limits_{p = {m - 4}}^{m - 2}\; {\frac{1}{3}\left( {{eLoad}_{p} - P_{{bat}_{p}} - {\sum\limits_{l = 1}^{4}\; \frac{e_{lp}}{4}}} \right)}} - \left( {{eLoad}_{i} - P_{{bat}_{i}}} \right)} \right)}}}} \right)$

where e_(li) and e_(lp) are the electric loads at the lth hour of theoperating day.

In some embodiments, incentive program module 912 handles theintegration of ELDR into the optimization problem as a bilinear problemwith two multiplicative decision variables. In order to linearize thecost function J(x) and customize the ELDR problem to the optimizationframework, several assumptions may be made. For example, incentiveprogram module 912 can assume that ELDR participation is only in thereal-time market, balancing operating reserve charges and make wholepayments are ignored, day-ahead prices are used over the horizon,real-time prices are used in calculating the total revenue from ELDRafter the decisions are made by the optimization algorithm, and thedecision to participate in ELDR is made in advance and passed to theoptimization algorithm based on which the battery asset is allocated.

In some embodiments, incentive program module 912 calculates theparticipation vector b_(i) as follows:

$b_{i} = \left\{ \begin{matrix}1 & {\forall{{{i/r_{{DA}_{i}}} \geq {{NBT}_{i}\mspace{14mu} {and}\mspace{14mu} i}} \in S}} \\0 & {otherwise}\end{matrix} \right.$

where r_(DA) _(i) is the hourly day-ahead price at the ith hour, NBT_(i)is the net benefits test value corresponding to the month to which thecorresponding hour belongs, and S is the set of nonevent days. Noneventdays can be determined for the year by choosing to participate every xnumber of days with the highest day-ahead prices out of y number of daysfor a given day type. This approach may ensure that there are noneventdays in the 45 days prior to a given event day when calculating the CBLfor the event day.

Given these assumptions and the approach taken by incentive programmodule 912 to determine when to participate in ELDR, incentive programmodule 912 can adjust the cost function J(x) as follows:

${J(x)} = {{- {\sum\limits_{i = k}^{k + h - 1}\; {r_{e_{i}}P_{{bat}_{i}}}}} - {\sum\limits_{i = k}^{k + h - 1}\; {r_{{FR}_{i}}P_{{FR}_{i}}}} + {\sum\limits_{i = k}^{k + h - 1}\; {r_{s_{i}}s_{i}}} + {w_{d}r_{d}d} - {\sum\limits_{i = k}^{k + h - 1}\; {b_{i}{r_{{DA}_{i}}\left( {{\sum\limits_{p = {m - 4}}^{m - 2}\; {{- \frac{1}{3}}P_{{bat}_{p}}}} + P_{{bat}_{i}}} \right)}}}}$

where b_(i) and m are known over a given horizon. The resulting termcorresponding to ELDR shows that the rates at the ith participation hourare doubled and those corresponding to the SAA are lowered. This meansit is expected that high level optimizer 632 will tend to charge thebattery during the SAA hours and discharge the battery during theparticipation hours. Notably, even though a given hour is set to be anELDR participation hour, high level optimizer 632 may not decide toallocate any of the battery asset during that hour. This is due to thefact that it may be more beneficial at that instant to participate inanother incentive program or to perform demand management.

Battery Sizing

Still referring to FIG. 9, high level optimizer 632 is shown to includea battery sizing module 914. Battery sizing module 914 can be configuredto determine the optimal battery size (e.g., the energy capacity and/orthe inverter power) required to minimize or maximize a given financialmetric. Such metrics include SPP, IRR, and/or NPV. The effectivecapacity C_(eff) and the effective power P_(eff) parameters of thebattery appear linearly in the capacity constraints and the powerconstraints, previously described. Accordingly, battery sizing module914 can treat these parameters as variables to be optimized withoutaffecting its linear property.

Although this approach is described primarily with respect to the sizingof a battery system, the approach may be extended to size equipment,such as chillers or heaters. The effective power P_(eff) and capacityC_(eff) can be interpreted as a demand of an asset, where the cost ofthe asset is desired to be minimized. The battery sizing approachdetermines the optimal battery size, while minimizing energy and demandcosts, while maximizing revenue from incentive programs. The costsassociated with a battery system include an energy cost, a power cost,and a fixed cost. The fixed cost can be any cost related to the batterysystem that is independent of energy capacity and power capacity. Thiscost is only incurred when the energy capacity is nonzero. Therefore, aninteger decision variable (e.g., having a value of one or zero) can beused when considering battery sizing in the optimization problem. Insome embodiments, battery sizing module 914 solves the optimizationproblem with mixed integer linear programming.

The following example illustrates an implementation of the batterysizing technique in which the cost function J(x) includes a singledemand charge and FR participation. Battery sizing module 914 can adjustthe cost function as shown in the following equation:

${J(x)} = {{- {\sum\limits_{i = k}^{k + h - 1}\; {r_{e_{i}}P_{{bat}_{i}}}}} - {\sum\limits_{i = k}^{k + h - 1}\; {r_{{FR}_{i}}P_{{FR}_{i}}}} + {\sum\limits_{i = k}^{k + h - 1}\; {r_{s_{i}}s_{i}}} + {w_{d}r_{d}d} + {w_{EUC}r_{EUC}C_{eff}} + {w_{PUC}r_{PUC}P_{eff}} + {w_{bat}r_{bat}v}}$

where r_(EUC) and w_(EUC) are the energy unit cost (e.g., $/kWh) andcorresponding weight adjustment over the optimization period, r_(PUC)and w_(PUC) are the power unit cost (e.g., $/kW) and correspondingweight adjustment over the optimization period, r_(bat) and w_(bat) arethe fixed cost (e.g., $) and its corresponding weight adjustment overthe optimization period, and v is a logical decision variable.

Battery sizing module 914 can generate and impose the followingconstraints on the optimization problem:

P _(bat) _(i) ≤P _(eff)

−P _(bat) _(i) ≤P _(eff)

C _(eff) −Mv≤0

P _(eff) −C _(rate) C _(eff)≤0

where M is set to a large number (e.g., ten thousand) and C_(rate) isthe power to energy ratio. The final constraint can be added to limitthe size of the battery based on the application desired. In someembodiments, the effective capacity C_(eff) and effective power P_(eff)can be treated as demand charges. The values of the capacities can becarried over as the optimization is solved and the horizon is shifted intime.

Peak Load Contribution Incorporation

Still referring to FIG. 9, high level optimizer 632 is shown to includea peak load contribution module 916. Peak load contribution (PLC) is acustomer's contribution to regional demand peaks that occur ingeographic area managed by a regional transmission organization (RTO) orindependent system operator (ISO) at certain hours within a base period.The regional demand at a given hour may be the summation of thecustomer's demand during (i.e., the rate at which the customer purchaseselectricity or another resource from a utility) as well as the demand ofother buildings in the geographic area during that hour. The customermay be billed based on its contribution to the peak regional demand(e.g., $/kW of the customer's PLC) in addition to the energy consumptioncharges and demand charges previously described.

PLC module 916 can be configured to modify the cost function J(x) toaccount for a cost associated with the customer's PLC. By incorporatingPLC costs into the cost function J(x), PLC module 916 enables high leveloptimizer 632 to allocate resource consumption and resource purchases toreduce the customer's PLC. High level optimizer 632 can reduce PLC costsby shifting the customer's load to non-peak times or shaving thecustomer's peak load. This can be done, for example, by precooling thebuilding during non-peak times, using thermal energy storage, and/orusing electrical energy storage such as a battery asset.

Accounting for the cost associated with the customer's PLC can be moredifficult than accounting for energy consumption costs and demandcharges. Unlike demand charge which is calculated based on thecustomer's maximum demand during predetermined demand charge periods,the hours over which PLC is calculated may not be known in advance. Thehours of peak regional demand (i.e., the coincidental peak (CP) hours)may not be known until the end of the base period over which PLC iscalculated. For example, the CP hours for a given base period (e.g., oneyear) may be determined by a RTO at the end of the base period based onthe demand of all the buildings within the geographic area managed bythe RTO during the base period (e.g., by selecting the hours with thehighest regional demand). The customer's PLC may then be determinedbased on the customer's demand during the designated CP hours and usedto calculate a cost of the customer's PLC. This cost may then be billedto the customer during the next time period (e.g., the next year),referred to as the billing period.

Another difficulty in accounting for PLC costs is that the base period,billing period, CP hours, and other factors used to calculate the PLCcost may differ from one RTO to another. For example, a RTO for thePennsylvania, Jersey, and Maryland (PJM) geographic area may define thebase period (i.e., the peak-setting period) as June 1^(st) of year Y toMay 31^(st) of year Y+1. The billing period (i.e., the delivery period)may be defined as June 1^(st) of year Y+1 to May 31^(st) of year Y+2.PJM may define the CP hours as the five hours with the highest loadsover the five highest peak load days across the PJM geographic region.

A customer's PLC in the PJM region may be calculated as the product ofthe customer's average electric load during the five CP hours and acapacity loss factor (CLF), as shown in the following equation:

${PLC}_{customer} = {{CLF} \times {\sum\limits_{i = 1}^{5}\; \frac{{eLoad}_{{cp}_{i}}}{5}}}$

where PLC_(customer) is the customer's peak load contribution calculatedduring year Y, CLF is the capacity loss factor (e.g., CLF=1.05), andeLoad_(cp) _(i) is the customer's electric load (e.g., kW) during theith CP hour.

The customer's PLC cost in the PJM region can be calculated as theproduct of the customer's PLC during year Y and a PLC rate, as shown inthe following equation:

PLC_(cost) =r _(PLC)×PLC_(customer)

where PLC_(cost) is the customer's PLC charge billed over the deliveryyear Y+1 (e.g., $) and r_(PLC) is the rate at which the customer ischarged for its PLC (e.g., $/kW).

An additional complication in the PJM region relates to the interactionbetween PLC costs and economic load demand response (ELDR) revenue. Insome embodiments, a customer participating in ELDR in the PJM regionduring one of the CP hours may be prohibited from reducing its PLC whileearning ELDR revenue at the same time. Accordingly, a customer wishingto reduce its load during an assumed CP hour for the purpose of reducingits capacity, transmission, and/or demand charge costs may be restrictedfrom making a bid for the same assumed CP hour in the ELDR market.

Another example of an organization which imposes PLC costs is theindependent electricity system operator (IESO) in Ontario, Canada.Relative to PJM, IESO may use a different base period, billing period,CP hours, and other factors used to calculate the PLC cost. For example,IESO may define the base period or peak-setting period as May 1^(st) ofyear Y to April 30^(th) of year Y+1. The billing period or adjustmentperiod for IESO may be defined as July 1^(st) of year Y+1 to June30^(th) of year Y+2. IESO may define the CP hours as the five hours withthe highest regional demands across the IESO geographic region.

At the end of the base period, IESO may calculate the customer's peakdemand factor (θ_(PDF)). The peak demand factor may be defined as theratio of the sum of the customer's peak demand to the sum of theregion-wide demand peaks during the five CP hours, as shown in thefollowing equation:

$\theta_{PDF} = \frac{\sum_{i = 1}^{5}\; {eLoad}_{{cp}_{i}}}{\sum_{i = 1}^{5}\; {sysLoad}_{{cp}_{i}}}$

where sysLoad_(cp) _(i) is the region-wide peak load during the ith CPhour and eLoad_(cp) _(i) is the customer's peak load during the ith CPhour.

The customer's PLC cost in the IESO region is known as a globaladjustment (GA) charge. The GA charge may be imposed as a monthly chargeduring the billing period. In some embodiments, the GA charge iscalculated by multiplying the customer's peak demand factor by themonthly region-wide global adjustment costs, as shown in the followingequation:

GA_(cost,month)=θ_(PDF)×GA_(total,month)

where GA_(cost,month) is the customer's monthly PLC cost (e.g., $) andGA_(total,month) is the region-wide global adjustment cost (e.g., $).The value of GA_(total,month) may be specified by IESO. In someembodiments, GA_(total,month) has a known value. In other embodiments,the value of GA_(total,month) may not be known until the end of the baseperiod.

In order to incorporate PLC costs into the cost function J(x) andallocate resource consumption/purchases in advance, PLC module 916 cangenerate or obtain a projection of the CP hours for an upcoming baseperiod. The projected CP hours can then be used by high level optimizer632 as an estimate of the actual CP hours. High level optimizer 632 canuse the projected CP hours to allocate one or more assets (e.g., abattery, thermal energy storage, HVAC equipment, etc.) to minimize thecustomer's demand during the projected CP hours. The technique used byPLC module 916 to incorporate PLC costs into the cost function J(x) isdescribed in greater detail with reference to FIG. 10.

Subplant Curve Incorporation

Still referring to FIG. 9, high level optimizer 632 is shown to includea subplant curves module 930. In the simplest case, it can be assumedthat the resource consumption of each subplant is a linear function ofthe thermal energy load produced by the subplant. However, thisassumption may not be true for some subplant equipment, much less for anentire subplant. Subplant curves module 930 may be configured to modifythe high level optimization problem to account for subplants that have anonlinear relationship between resource consumption and load production.

Subplant curves module 930 is shown to include a subplant curve updater932, a subplant curves database 934, a subplant curve linearizer 936,and a subplant curves incorporator 938. Subplant curve updater 932 maybe configured to request subplant curves for each of subplants 520-530from low level optimizer 634. Each subplant curve may indicate an amountof resource consumption by a particular subplant (e.g., electricity usemeasured in kW, water use measured in L/s, etc.) as a function of thesubplant load.

In some embodiments, low level optimizer 634 generates the subplantcurves by running the low level optimization process for variouscombinations of subplant loads and weather conditions to generatemultiple data points. Low level optimizer 634 may fit a curve to thedata points to generate the subplant curves and provide the subplantcurves to subplant curve updater 832. In other embodiments, low leveloptimizer 634 provides the data points to subplant curve updater 932 andsubplant curve updater 932 generates the subplant curves using the datapoints. Subplant curve updater 932 may store the subplant curves insubplant curves database 934 for use in the high level optimizationprocess.

In some embodiments, the subplant curves are generated by combiningefficiency curves for individual devices of a subplant. A deviceefficiency curve may indicate the amount of resource consumption by thedevice as a function of load. The device efficiency curves may beprovided by a device manufacturer or generated using experimental data.In some embodiments, the device efficiency curves are based on aninitial efficiency curve provided by a device manufacturer and updatedusing experimental data. The device efficiency curves may be stored inequipment models 618. For some devices, the device efficiency curves mayindicate that resource consumption is a U-shaped function of load.Accordingly, when multiple device efficiency curves are combined into asubplant curve for the entire subplant, the resultant subplant curve maybe a wavy curve. The waves are caused by a single device loading upbefore it is more efficient to turn on another device to satisfy thesubplant load.

Subplant curve linearizer 936 may be configured to convert the subplantcurves into convex curves. A convex curve is a curve for which a lineconnecting any two points on the curve is always above or along thecurve (i.e., not below the curve). Convex curves may be advantageous foruse in the high level optimization because they allow for anoptimization process that is less computationally expensive relative toan optimization process that uses non-convex functions. Subplant curvelinearizer 936 may be configured to break the subplant curves intopiecewise linear segments that combine to form a piecewise-definedconvex curve. Subplant curve linearizer 936 may store the linearizedsubplant curves in subplant curves database 934.

Subplant curve incorporator 938 may be configured to modify the highlevel optimization problem to incorporate the subplant curves into theoptimization. In some embodiments, subplant curve incorporator 938modifies the decision variables to include one or more decision vectorsrepresenting the resource consumption of each subplant. Subplant curveincorporator 938 may modify the inequality constraints to ensure thatthe proper amount of each resource is consumed to serve the predictedthermal energy loads. In some embodiments, subplant curve incorporator938 formulates inequality constraints that force the resource usage foreach resource in the epigraph of the corresponding linearized subplantcurve. For example, chiller subplant 522 may have a linearized subplantcurve that indicates the electricity use of chiller subplant 522 (i.e.,input resource in₁) as a function of the cold water production ofchiller subplant 522 (i.e., output resource out₁). The linearizedsubplant curve may include a first line segment connecting point [u₁,Q₁] to point [u₂, Q₂], a second line segment connecting point [u₂, Q₂]to point [u₃, Q₃], and a third line segment connecting point [u₃, Q₃] topoint [u₄, Q₄].

Subplant curve incorporator 938 may formulate an inequality constraintfor each piecewise segment of the subplant curve that constrains thevalue of the decision variable representing chiller electricity use tobe greater than or equal to the amount of electricity use defined by theline segment for the corresponding value of the cold water production.Similar inequality constraints can be formulated for other subplantcurves. For example, subplant curve incorporator 938 may generate a setof inequality constraints for the water consumption of chiller subplant522 using the points defining the linearized subplant curve for thewater consumption of chiller subplant 522 as a function of cold waterproduction. In some embodiments, the water consumption of chillersubplant 522 is equal to the cold water production and the linearizedsubplant curve for water consumption includes a single line segmentconnecting point [u₅, Q₅] to point [u₆, Q₆]. Subplant curve incorporator938 may repeat this process for each subplant curve for chiller subplant522 and for the other subplants of the central plant to define a set ofinequality constraints for each subplant curve.

The inequality constraints generated by subplant curve incorporator 938ensure that high level optimizer 632 keeps the resource consumptionabove all of the line segments of the corresponding subplant curve. Inmost situations, there is no reason for high level optimizer 632 tochoose a resource consumption value that lies above the correspondingsubplant curve due to the economic cost associated with resourceconsumption. High level optimizer 632 can therefore be expected toselect resource consumption values that lie on the correspondingsubplant curve rather than above it.

The exception to this general rule is heat recovery chiller subplant523. The equality constraints for heat recovery chiller subplant 523provide that heat recovery chiller subplant 523 produces hot water at arate equal to the subplant's cold water production plus the subplant'selectricity use. The inequality constraints generated by subplant curveincorporator 838 for heat recovery chiller subplant 523 allow high leveloptimizer 632 to overuse electricity to make more hot water withoutincreasing the amount of cold water production. This behavior isextremely inefficient and only becomes a realistic possibility when thedemand for hot water is high and cannot be met using more efficienttechniques. However, this is not how heat recovery chiller subplant 523actually operates.

To prevent high level optimizer 632 from overusing electricity, subplantcurve incorporator 838 may check whether the calculated amount ofelectricity use (determined by the optimization algorithm) for heatrecovery chiller subplant 523 is above the corresponding subplant curve.In some embodiments, the check is performed after each iteration of theoptimization algorithm. If the calculated amount of electricity use forheat recovery chiller subplant 523 is above the subplant curve, subplantcurve incorporator 838 may determine that high level optimizer 632 isoverusing electricity. In response to a determination that high leveloptimizer 632 is overusing electricity, subplant curve incorporator 838may constrain the production of heat recovery chiller subplant 523 atits current value and constrain the electricity use of subplant 523 tothe corresponding value on the subplant curve. High level optimizer 632may then rerun the optimization with the new equality constraints.

Peak Load Contribution Module

Referring now to FIG. 10, a block diagram illustrating peak loadcontribution (PLC) module 916 in greater detail is shown, according toan exemplary embodiment. In some embodiments, PLC module 916 may beimplemented as a component of energy storage controller 506, asdescribed with reference to FIGS. 5A and 6A. In other embodiments, PLCmodule 916 may be implemented as a component of controller 552, asdescribed with reference to FIGS. 5B and 6B. In other embodiments, PLCmodule 916 may be implemented as a component of planning tool 702, asdescribed with reference to FIGS. 7-8.

As discussed above, PLC is a customer's contribution to regional demandpeaks that occur in geographic area managed by a regional transmissionorganization (RTO) or independent system operator (ISO) at certain hourswithin a base period. The customer may be billed based on itscontribution to the peak regional demand (e.g., $/kW of the customer'sPLC) in addition to the energy consumption charges and demand chargespreviously described. The rate at which the customer is billed (i.e.,the peak load contribution rate) may be provided as an input to PLCmodule 916. For example, the PLC rate can be received as an input fromutilities 510 or from load/rate predictor 622, as shown in FIG. 10. Inother embodiments, the PLC rate can be defined by a user (e.g., receivedas an input parameter from user device 1002) or received from other datasources.

PLC module 916 can be configured to modify the cost function J(x) toaccount for a cost associated with the customer's PLC. By incorporatingPLC costs into the cost function J(x), PLC module 916 enables high leveloptimizer 632 to allocate resource consumption and resource purchases toreduce the customer's PLC. High level optimizer 632 can reduce PLC costsby shifting the customer's load to non-peak times or shaving thecustomer's peak load. This can be done, for example, by precooling thebuilding during non-peak times, using thermal energy storage, and/orusing electrical energy storage such as a battery asset.

In some embodiments, the coincidental peak (CP) hours over which acustomer's PLC is determined may not be known in advance. In the case ofthe IESO (Ontario), the system-wide peal loads during the CP hours alsomay not be known in advance. In order to minimize a customer's PLC overa given base period, PLC module 916 may determine or predict the CPhours for an upcoming base period. In some embodiments, the CP hours aredefined by a user. For example, the CP hours can be received as an inputfrom user device 1002 or from another data source. An example of a userinterface which can be used to specify peak hours is described ingreater detail with reference to FIG. 12. In other embodiments, the CPhours are predicted by PLC module 916.

Still referring to FIG. 10, PLC module 916 is shown to include ahistorical load database 1004 and a peak hour predictor 1012. Historicalload database 1004 may be configured to store load history data for aparticular building and/or other buildings in the same geographicregion. The load history data may include a history of regional electricloads for the geographic region in which the building is located. Insome embodiments, peak hour predictor 1012 uses the load history datafrom historical load database to predict the CP hours (i.e., theprojected peak hours) for the upcoming base period. In some embodiments,peak hour predictor 1012 uses historical weather data and/or weatherforecasts from a weather service (e.g., weather service 604) incombination with the load history data to predict the CP hours. The peakhours, whether specified by a user or predicted by peak hour predictor1012, can be provided as an input to a peak hour mask generator 1014.

Peak hour mask generator 1014 can be configured to generate a peak hoursmask based on the projected peak hours. The peak hours mask may besimilar to the demand charge mask described with reference to FIG. 9.For example, the peak hours mask may be a logical vector including anelement λ_(i) for each hour i that occurs during the optimizationperiod. Each element λ_(i) of the peak hours mask may include a binaryvalue (e.g., one or zero, true or false, yes or no, etc.) that indicateswhether the corresponding hour i is a peak hour or a non-peak hour. Forexample, the element λ_(i) may have a value of one (i.e., λ_(i)=1) ifthe hour i is a peak hour and a value of zero (i.e., λ_(i)=0) if thehour i is a non-peak hour. An example of a peak hours mask for a twelvehour period is shown in the following equation:

λ=[0,0,0,0,1,1,1,0,0,0,1,1]^(T)

where λ₁, λ₂, λ₃, λ₄, λ₈, λ₉, and λ₁₀ have values of zero, and λ₅, λ₆,λ₇, λ₁₁, and λ₁₂ have values of one. This indicates that hours 1-4 and8-10 are non-peak hours, whereas hours 5-7 and 11-12 are peak hours.

In some embodiments, the peak hours mask defines a predetermined numberof hours as projected peak hours. The predetermined number of hours maybe the same as the known number of CP hours in the base period (e.g.,five hours). For example, if the base period is known to include five CPhours, the peak hours mask may define five of the hours as peak hours.However, any number of hours can be defined as projected peak hoursusing the peak hours mask, even if the number of projected peak hours isgreater than or less than the known number of CP hours in the baseperiod. By defining a greater number of hours as projected peak hours(i.e., greater than the known number of CP hours in the base period),peak hour mask generator 1014 can increase the probability that theprojected peak hours include the actual peak hours, which may be unknownuntil the end of the base period. Peak hour mask generator 1014 canprovide the peak hours mask to PLC term generator 1016 for use ingenerating one or more PLC terms in the cost function J(x).

Still referring to FIG. 10, PLC module 916 is shown to include a ratefactor generator 1008. Rate factor generator 1008 can be configured togenerate (e.g., determine, calculate, identify, etc.) a rate factor rassociated with the PLC charge. In some embodiments, the rate factor ris provided as an input from utilities 510, load/rate predictor 622,user device 1002, or another data source. In other embodiments, the ratefactor r is calculated by rate factor generator 1008 as a function ofone or more parameters. In some embodiments, the parameters specifywhether PLC module 916 is implemented in a PJM region or an IESO region.The parameters can be specified by a user or otherwise received as aninput to PLC module 916. For example, user interface generator 1006 cangenerate a user interface which prompts the user to select between PJMand IESO (shown in FIG. 12).

In the PJM region, the rate factor r may be a function of a PLC rater_(PLC) and a capacity loss factor CLF. For example, rate factorgenerator 1008 can calculate the rate factor for the PJM region r_(PJM)using the following equation:

$r_{PJM} = \frac{{CLF} \times r_{PLC}}{5}$

where r_(PJM) is the rate factor, CLF is the capacity loss factor, andr_(PLC) is the PLC rate. The capacity loss factor CLF and the PLC rater_(PLC) can be retrieved from a database, predicted by load/ratepredictor 622, received from utilities 510, or specified by a user. Forexample, the user may be prompted to specify values for the PLC rateparameter r_(PLC) and the capacity loss factor parameter CLF in responseto selecting the PJM region via the user interface.

In the IESO region, the rate factor r may be a function of theregion-wide global adjustment (GA) costs and the region-wide peak loadduring coincidental peaks. For example, rate factor generator 1008 cancalculate the rate factor for the IESO region r_(IESO) using thefollowing equation:

$r_{IESO} = \frac{{GA}_{{total}_{year}}}{{sys}\; \hat{L}\; {oad}_{cp}}$

where r_(IESO) is the rate factor, GA_(total) _(year) is an estimate ofthe annual GA costs for the region (e.g., Ontario-wide GA costs), andsys{circumflex over (L)}oad_(cp) is an estimate of the sum of theregion-wide peak loads during coincidental peaks. The annual GA costsGA_(total) _(year) and the estimated region-wide peak loadsys{circumflex over (L)}oad_(cp) can be retrieved from a database,predicted by load/rate predictor 622, received from utilities 510, orspecified by a user. For example, the user may be prompted to specifyvalues for the annual GA costs parameter GA_(total) _(year) and theestimated region-wide peak load sys{circumflex over (L)}oad_(cp)parameter in response to selecting the IESO region via the userinterface. Rate factor generator 1008 can provide the rate factorr_(PJM) or r_(IESO) to PLC term generator 1016 for use in generating oneor more PLC terms in the cost function J(x).

Still referring to FIG. 10, PLC module 916 is shown to include adecision variable selector 1010. Decision variable selector 1010 can beconfigured to select or identify one or more decision variables toinclude in the PLC term of the cost function J(x). In some embodiments,the decision variables are defined by high level optimizer 632 and theoptimal values of the decision variables are determined as a result ofthe high level optimization process. However, not all of the decisionvariables may be relevant to the PLC cost incurred by a customer.Decision variable selector 1010 may identify one or more of the decisionvariables that have an impact on the PLC cost and may provide anindication of the identified decision variables to PLC term generator1016. PLC term generator 1016 can then use the identified decisionvariables to generate one or more PLC terms in the cost function J(x).

In some embodiments, the decision variables selected by decisionvariable selector 1010 include predicted resource purchases from autility for each hour of the optimization period (e.g., predictedelectricity purchases, predicted water purchases, predicted natural gaspurchases, etc.). The amount of electricity purchased from utilities 510may be defined as the difference between the electric load and theelectricity discharged from a battery asset, as shown in the followingequation:

ePurchase_(i) =eLoad_(i) −P _(bat) _(i)

where ePurchase_(i) represents the rate at which electricity ispurchased from utilities 510 during hour i (e.g., average kW during thehour), eLoad_(i) is the predicted electric load during hour i (e.g.,kW), and P_(bat) _(i) is the rate at which electricity is dischargedfrom a battery asset during hour i (e.g., kW). The electric loadeLoad_(i) can be predicted by load/rate predictor 622, whereas thebattery charge/discharge rate P_(bat) _(i) may be optimized by highlevel optimizer 632.

In some embodiments, the decision variables selected by decisionvariable selector 1010 include battery power setpoints. For example, theselected decision variables can include a battery power setpoint P_(bat)_(i) for each hour i of the optimization period. The battery powersetpoints can subtract from the predicted electric load eLoad_(i) todetermine the predicted electricity purchase ePurchase_(i) or can beindependent decision variables in the cost function J(x). In someembodiments, the selected decision variables include subplant loads forgenerator subplants 520 and/or storage subplants 530. For example, theselected decision variables can include optimal operating points forgenerator subplants 520 (e.g., optimal power consumption, optimalresource production, etc.), optimal thermal energy storage/dischargerates for TES subplants 531-532, and/or optimal battery charge/dischargerates for electrical energy storage subplant 533. Decision variableselector 1010 can provide the selected decision variables to PLC termgenerator 1016 for use in generating one or more PLC terms in the costfunction J(x).

PLC term generator 1016 is shown receiving the peak hours mask from peakhour mask generator 1014, the rate factor from rate factor predictor1008, and the selected decision variables from decision variableselector 1010. PLC term generator 1016 can use the peak hours mask, therate factor, and the selected decision variables to generate one or morePLC terms. The PLC terms can be included in the cost function J(x) orindependently optimized to reduce the customer's PLC cost. For example,high level optimizer 632 can be configured to minimize PLC cost byminimizing the customer's electric cost during projected peak hours, asshown in the following equation:

$\arg \mspace{11mu} {\min\limits_{P_{{bat}_{i}}}\left( {r{\sum\limits_{i = k}^{k + h - 1}\; {\lambda_{i}\left( {{eLoad}_{i} - P_{{bat}_{i}}} \right)}}} \right)}$

where h is the duration of the optimization period, r is the rate factor(e.g., r_(PJM) or r_(IESO)), λ_(i) is an element of the peak hours maskfor hour i, eLoad_(i) is the estimated electric load during hour i, andP_(bat) _(i) is the rate at which electricity is discharged from abattery asset during hour i. The term to be minimized can be generatedby PLC term generator 1016. The difference between eLoad_(i) and P_(bat)_(i) represents the amount of electricity purchased from utilities 510during hour i.

In some embodiments, PLC term generator 1016 generates a PLC term whichuses the battery power setpoint P_(bat) _(i) as the decision variable.For example, PLC term generator 1016 can generate the following PLCterm:

${- r}{\sum\limits_{i = k}^{k + h - 1}\; {\lambda_{i}P_{{bat}_{i}}}}$

where the variables r, λ_(i), and P_(bat) _(i) are the same aspreviously described. This PLC term can be added to the objectivefunction J(x) as shown in the following equation:

${J(x)} = {\ldots - {r{\sum\limits_{i = k}^{k + h - 1}\; {\lambda_{i}P_{{bat}_{i}}}}} + \ldots}$

where the PLC term represents an additional cost to be minimized overthe optimization period. Discharging the battery (i.e., positive valuesof P_(bat) _(i) ) subtracts from the amount of electricity purchasedfrom utilities 510 and reduces the value of the PLC term (i.e., makesthe PLC term more negative), whereas charging the battery (i.e.,negative values of P_(bat) _(i) ) adds to the amount of electricitypurchased from utilities 510 and increases the value of the PLC term.

The term λ_(i)P_(bat) _(i) in the previous equation may have a value ofzero for hours that are not projected peak hours and a value of P_(bat)_(i) for hours that are projected peak hours due to the value of λ_(i)(e.g., λ_(i)=0 for non-peak hours and λ_(i)=1 for peak hours). Thiscauses the PLC term to only sum the customer's electric load duringprojected peak hours. If the customer is participating in an ELDRprogram, the customer may be prevented from submitting a bid during thehours that are projected peak hours. This implies that if the hourlymask has a value of λ_(i)=1 for a given hour, the corresponding ELDRparticipation mask may be forced to zero. The modified cost function canbe optimized by high level optimizer 632 to determine optimal values forthe decision variables.

User Interfaces

Referring now to FIGS. 11-14, several user interfaces 1100-1400 whichcan be generated by user interface generator 1006 are shown, accordingto an exemplary embodiment. FIG. 11 illustrates an interface 1100 whichallows a user to select one or more optional terms to include in thecost function J(x). Interface 1100 is shown to include a frequencyregulation option 1102, economic load demand response option 1104, and apeak load contribution option 1106. Based on the selections made viainterface 1100, cost function module 902 may add or remove one or moreterms from the cost function J(x). For example, if the user selects peakload contribution option 1106, cost function module 902 may trigger PLCmodule 916 to generate the PLC term and may add the PLC term to the costfunction J(x).

FIG. 12 illustrates an interface 1200 which allows a user to inputvalues for various parameters used by PLC module 916. Interface 1200 isshown to include a RTO parameter 1202 which allows the user to selectbetween PJM, IESO, or any other RTO. If PJM is selected via RTOparameter 1202, the user can input values for PJM PLC parameters 1204such as the PLC rate r_(PLC) and the capacity loss factor CLF. If IESOis selected via RTO parameter 1202, the user can input values for IESOparameters 1206 such as the annual region-wide GA cost estimateGA_(total) _(year) and the region-wide CP peaks estimate sys{circumflexover (L)}oad_(cp). In FIG. 12, IESO parameters 1206 are marked (e.g.,grayed out, struck through, etc.) to indicate that they will not be usedbecause PJM is selected via RTO parameter 1202. Interface 1200 alsoallows the user to specify actual CP hours 1208, which can be used byPLC module 916 to generate the peak hours mask.

FIG. 13 illustrates an interface 1300 which allows a user to enter apercent change in various parameters from year-to-year. Each row ofinterface 1300 may define a percent change in each of the parametersused by PLC module 916 relative to the values from the previous year. Insome embodiments, interface 1300 is presented to a user when high leveloptimizer 632 is implemented as a component of planning tool 702.Interface 1300 allows a user to specify a number of years over which theoptimization will be performed by planning tool 702. The user canspecify percent change values via interface 1300 to predict cost over anoptimization period or planning period spanning several years.

FIG. 14 illustrates an interface 1400 which allows a user to defineprojected CP hours for the duration of the optimization period (e.g., ayear). Interface 1400 may include a cell for every hour of theoptimization period. In some embodiments, the user defines projected CPhours by setting the value of the corresponding cell to 1 or anotheraffirmative binary value (e.g., yes, true, etc.). For example, interface1400 is shown to include a value of 1 in the cell at the intersection ofJanuary 3^(rd) and hour ending 17. This indicates that the 17^(th) hourof January 3rd (i.e., from 4:00 PM until 5:00 PM) is a projected CPhour. Similarly, interface 1400 is shown to include a value of 1 in thecell at the intersection of January 9^(th) and hour ending 18. Thisindicates that the 18^(th) hour of January 9^(th) (i.e., from 5:00 PMuntil 6:00 PM) is a projected CP hour. The rest of the cells ininterface 1400 have values of 0 or another negative binary value (e.g.,no, false, etc.), which indicates that the remaining hours are notprojected CP hours. In some embodiments, the cells that indicateprojected CP hours may be highlighted or otherwise marked (e.g.,colored, shaded, bolded, etc.) to allow the user to easily spot suchcells in interface 1400. PLC module 916 can use the values of the cellsin interface 1400 to generate the peak hours mask.

After all of the pertinent parameter values are entered via interfaces1100-1400, high level optimizer 632 can perform an optimization togenerate battery asset allocations for the duration of the optimizationperiod. For implementations in which high level optimizer 632 is acomponent of planning tool 702, high level optimizer 632 can calculatethe savings resulting from PLC or GA due to optimal allocation of thebattery asset during the projected CP hours for each year in theoptimization period or planning period. In the planning tool framework,the savings due to PLC/GA allows the user to see the potential costsavings resulting from the peak load reduction when a battery asset isused.

Flow Diagrams

Referring now to FIG. 15, a flowchart of a process 1500 for allocatingenergy storage is shown, according to an exemplary embodiment. Process1500 can be performed by one or more components of frequency responseoptimization system 100, photovoltaic energy system 300, energy storagesystem 500, planning system 700, or any other type of energy storagesystem. In some embodiments, process 1500 is performed by energy storagecontroller 506, as described with reference to FIGS. 5A and 6A.

Process 1500 is shown to include generating a cost function including apeak load contribution (PLC) term (step 1502). In some embodiments, thePLC term defines a cost based on a customer's contribution to regionaldemand peaks that occur in geographic area managed by a regionaltransmission organization (RTO) or independent system operator (ISO) atcertain hours within a base period. The customer may be billed based onits contribution to the peak regional demand (e.g., $/kW of thecustomer's PLC) in addition to energy consumption charges and demandcharges. The PLC term can be generated by PLC term generator 1016, asdescribed with reference to FIG. 10. In some embodiments, step 1502 isperformed by cost function module 902. The cost function generated instep 1502 can be the same or similar to any of the cost functions J(x)described with reference to FIGS. 9-10.

Process 1500 is shown to include generating a peak hours mask definingone or more hours in an optimization period as projected peak hours(step 1504). In some embodiments, the peak hours mask is generated bypeak hour mask generator 1014, as described with reference to FIG. 10.The peak hour mask may include a vector of binary values. Each of thebinary values may correspond to an hour that occurs within theoptimization period and may indicate whether the hour is a projectedpeak hour or not a projected peak hour.

Process 1500 is shown to include modifying the cost function by applyingthe peak hours mask to the PLC term (step 1506). Applying the peak hoursmask may include multiplying the resource purchase during each hour bythe corresponding value of the peak hours mask. In some embodiments,projected peak hours are multiplied by a value of one, whereas projectednon-peak hours are multiplied by a value of zero. This limits the PLCterm to only the hours designated as projected peak hours in the peakhours mask.

Process 1500 is shown to include allocating an optimal amount of energyto store or discharge from energy storage to each of a plurality of timesteps in the optimization period (step 1508). Step 1508 can includeoptimizing the modified cost function generated in step 1506 todetermine the optimal amounts of energy to store or discharge in eachtime step. In some embodiments, the energy is electrical energy and theenergy storage is a battery asset. In other embodiments, the energy isthermal energy and the energy storage includes thermal energy storagetanks.

Process 1500 is shown to include operating the energy storage to storeand discharge the optimal amount of energy allocated to each time stepduring the optimization period (step 1510). Storing energy and othertypes of resources allows for the resources to be purchased at timeswhen the resources are relatively less expensive (e.g., during non-peakelectricity hours) and stored for use at times when the resources arerelatively more expensive (e.g., during peak electricity hours). Storingresources also allows the resource demand of the building to be shiftedin time. For example, resources can be purchased from utilities at timeswhen the demand for heating or cooling is low and immediately convertedinto hot or cold thermal energy (e.g., by generator subplants 520). Thethermal energy can be stored and retrieved at times when the demand forheating or cooling is high. This allows energy storage controller 506 tosmooth the resource demand of the building and reduces the maximumrequired capacity of generator subplants 520. Smoothing the demand alsoallows energy storage controller 506 to reduce the peak amount of energypurchased from the utility during an applicable demand charge period,which results in a lower demand charge.

Referring now to FIG. 16, a flowchart of a process 1600 for optimizingenergy cost with a PLC charge is shown, according to an exemplaryembodiment. Process 1600 can be performed by one or more components offrequency response optimization system 100, photovoltaic energy system300, planning system 700, energy cost optimization system 550, or anyother type of energy system. In some embodiments, process 1600 isperformed by controller 552, as described with reference to FIGS. 5B and6B.

Process 1600 is shown to include generating a cost function including apeak load contribution (PLC) term (step 1602). In some embodiments, thePLC term defines a cost based on a customer's contribution to regionaldemand peaks that occur in geographic area managed by a regionaltransmission organization (RTO) or independent system operator (ISO) atcertain hours within a base period. The customer may be billed based onits contribution to the peak regional demand (e.g., $/kW of thecustomer's PLC) in addition to energy consumption charges and demandcharges. The PLC term can be generated by PLC term generator 1016, asdescribed with reference to FIG. 10. In some embodiments, step 1602 isperformed by cost function module 902. The cost function generated instep 1602 can be the same or similar to any of the cost functions J(x)described with reference to FIGS. 9-10.

Process 1600 is shown to include generating a peak hours mask definingone or more hours in an optimization period as projected peak hours(step 1604). In some embodiments, the peak hours mask is generated bypeak hour mask generator 1014, as described with reference to FIG. 10.The peak hour mask may include a vector of binary values. Each of thebinary values may correspond to an hour that occurs within theoptimization period and may indicate whether the hour is a projectedpeak hour or not a projected peak hour.

Process 1600 is shown to include modifying the cost function by applyingthe peak hours mask to the PLC term (step 1606). Applying the peak hoursmask may include multiplying the resource purchase during each hour bythe corresponding value of the peak hours mask. In some embodiments,projected peak hours are multiplied by a value of one, whereas projectednon-peak hours are multiplied by a value of zero. This limits the PLCterm to only the hours designated as projected peak hours in the peakhours mask.

Process 1600 is shown to include allocating an optimal amount of energyto be consumed by HVAC equipment to each of a plurality of time steps inthe optimization period (step 1608). Step 1608 can include optimizingthe modified cost function generated in step 1606 to determine theoptimal amounts of energy to consume and/or purchase from the utility ineach time step. In some embodiments, the amount of energy consumed bythe HVAC equipment may be equal to the amount of energy purchased fromthe utility. In other embodiments, the amount of energy consumed by theHVAC equipment in a given time step may be less than the amount ofenergy purchased from the utility. For example, some electricitypurchased from the utility may be provided directly to the building tosatisfy the building's electric load, whereas the remaining electricitypurchased from the utility may be consumed by the HVAC equipment. Insome embodiments, step 1608 includes determining an optimal amount ofenergy to purchase from the utility as well as the optimal amount ofenergy to be consumed by the HVAC equipment during each time step in theoptimization period.

Process 1600 is shown to include operating the HVAC equipment to consumethe optimal amount of energy allocated to each time step during theoptimization period (step 1610). Step 1610 can include operating any ofgenerator subplants 520 to consume purchased resources and/or generateresources that can be provided to building 502. In some embodiments,step 1610 includes providing a portion of the energy purchased from theutility to the building 502. For example, the amount of energy purchasedin each time step can be used by generator subplants 520 to generatevarious resources (e.g., hot thermal energy, cold thermal energy, etc.)or provided directly to building 502 (e.g., providing purchasedelectricity to building 502).

Configuration of Exemplary Embodiments

The construction and arrangement of the systems and methods as shown inthe various exemplary embodiments are illustrative only. Although only afew embodiments have been described in detail in this disclosure, manymodifications are possible (e.g., variations in sizes, dimensions,structures, shapes and proportions of the various elements, values ofparameters, mounting arrangements, use of materials, colors,orientations, etc.). For example, the position of elements can bereversed or otherwise varied and the nature or number of discreteelements or positions can be altered or varied. Accordingly, all suchmodifications are intended to be included within the scope of thepresent disclosure. The order or sequence of any process or method stepscan be varied or re-sequenced according to alternative embodiments.Other substitutions, modifications, changes, and omissions can be madein the design, operating conditions and arrangement of the exemplaryembodiments without departing from the scope of the present disclosure.

The present disclosure contemplates methods, systems and programproducts on any machine-readable media for accomplishing variousoperations. The embodiments of the present disclosure can be implementedusing existing computer processors, or by a special purpose computerprocessor for an appropriate system, incorporated for this or anotherpurpose, or by a hardwired system. Embodiments within the scope of thepresent disclosure include program products comprising machine-readablemedia for carrying or having machine-executable instructions or datastructures stored thereon. Such machine-readable media can be anyavailable media that can be accessed by a general purpose or specialpurpose computer or other machine with a processor. By way of example,such machine-readable media can comprise RAM, ROM, EPROM, EEPROM, CD-ROMor other optical disk storage, magnetic disk storage or other magneticstorage devices, or any other medium which can be used to carry or storedesired program code in the form of machine-executable instructions ordata structures and which can be accessed by a general purpose orspecial purpose computer or other machine with a processor. Combinationsof the above are also included within the scope of machine-readablemedia. Machine-executable instructions include, for example,instructions and data which cause a general purpose computer, specialpurpose computer, or special purpose processing machines to perform acertain function or group of functions.

Although the figures show a specific order of method steps, the order ofthe steps may differ from what is depicted. Also two or more steps canbe performed concurrently or with partial concurrence. Such variationwill depend on the software and hardware systems chosen and on designerchoice. All such variations are within the scope of the disclosure.Likewise, software implementations could be accomplished with standardprogramming techniques with rule based logic and other logic toaccomplish the various connection steps, processing steps, comparisonsteps and decision steps.

What is claimed is:
 1. A central plant comprising: one or more storagedevices configured to store one or more resources purchased from autility or generated by the central plant and to discharge the one ormore resources for use in satisfying a building load; and a controllerconfigured to: obtain a cost function comprising a peak loadcontribution (PLC) term, wherein the PLC term represents a cost based onan amount of the one or more resources purchased from the utility duringcoincidental peak (CP) hours of an optimization period comprising aplurality of time steps, the CP hours comprising a subset of theplurality of time steps, wherein the cost is a function of one or moredecision variables representing an amount of the one or more resourcesto store in the one more storage devices or discharge from the one ormore storage devices during each of the plurality of time steps; modifythe cost function by applying a peak hours mask to the PLC term, whereinthe peak hours mask identifies one or more hours in the optimizationperiod as projected peak hours and causes the controller to assignsubstantially zero cost, in the PLC term, to the one or more resourcespurchased from the utility during any hours not identified as projectedpeak hours; and allocate, to each of the time steps within theoptimization period, an amount of the one or more resources to store inthe one or more storage devices or discharge from the one or morestorage devices during the time step by performing an optimization ofthe modified cost function to determine values of the decisionvariables.
 2. The central plant of claim 1, wherein the CP hourscomprise one or more hours of the optimization period during whichregional demand peaks occur for a geographic region in which thebuilding is located.
 3. The central plant of claim 1, wherein: the CPhours are unknown prior to the optimization period; and the projectedpeak hours comprise an estimate of the CP hours and are identified priorto the optimization period.
 4. The central plant of claim 1, wherein thepeak hours mask comprises a vector of binary values, each of the binaryvalues corresponding to an hour of the optimization period andindicating whether the corresponding hour is a projected peak hour. 5.The central plant of claim 1, wherein the controller is configured tocreate the peak hours mask based on user input defining the projectedpeak hours.
 6. The central plant of claim 1, wherein the controller isconfigured to: predict regional demand peaks for a geographic region inwhich the building is located; define the projected peak hours based onthe predicted regional demand peaks; and create the peak hours maskusing the projected peak hours.
 7. The central plant of claim 6, whereinthe controller is configured to predict the regional demand peaks basedon at least one of load history data and weather data for the geographicregion in which the building is located.
 8. The central plant of claim1, wherein: the PLC term comprises a rate factor defining a cost perunit of the one or more resources purchased from the utility during theCP hours; and the controller is configured to: identify a geographicregion in which the building is located; and calculate the rate factorbased on one or more parameters that depend on the identified geographicregion.
 9. The central plant of claim 1, wherein the one or more one ormore storage devices comprise one or more of a hot water storage tank ora cold thermal energy storage tank.
 10. The central plant of claim 1,wherein the one or more resources comprise one or more of hot water,cold water, or steam.
 11. A method for allocating one or more resourcesin a central plant, the method comprising: obtaining a cost functioncomprising a peak load contribution (PLC) term, wherein the PLC termrepresents a cost based on an amount of the one or more resourcespurchased from the utility during coincidental peak (CP) hours of anoptimization period comprising a plurality of time steps, the CP hourscomprising a subset of the plurality of time steps, wherein the cost isa function of one or more decision variables representing an amount ofthe one or more resources to store in one or more storage devices or todischarge from the one or more storage devices during each of theplurality of time steps; modifying the cost function by applying a peakhours mask to the PLC term, wherein the peak hours mask identifies oneor more hours in the optimization period as projected peak hours andcauses the one or more resources purchased from the utility during anyhours not identified as projected peak hours to be assignedsubstantially zero cost in the PLC term; allocating, to each of the timesteps within the optimization period, an amount of the one or moreresources to store in the one or more storage devices or discharge fromthe one or more storage devices during the time step by performing anoptimization of the modified cost function to determine values of thedecision variables.
 12. The method of claim 11, wherein the CP hourscomprise one or more hours of the optimization period during whichregional demand peaks occur for a geographic region in which thebuilding is located.
 13. The method of claim 11, wherein: the CP hoursare unknown prior to the optimization period; and the projected peakhours comprise an estimate of the CP hours and are identified prior tothe optimization period.
 14. The method of claim 11, wherein the peakhours mask comprises a vector of binary values, each of the binaryvalues corresponding to an hour of the optimization period andindicating whether the corresponding hour is a projected peak hour. 15.The method of claim 11, further comprising: predicting regional demandpeaks for a geographic region in which the building is located; definingthe projected peak hours based on the predicted regional demand peaks;and creating the peak hours mask using the projected peak hours.
 16. Themethod of claim 15, wherein the regional demand peaks are predictedbased on at least one of load history data and weather data for thegeographic region in which the building is located.
 17. The method ofclaim 11, wherein the PLC term comprises a rate factor defining a costper unit of the electrical energy purchased from the utility during theCP hours; the method further comprising: identifying a geographic regionin which the building is located; and calculating the rate factor basedon one or more parameters that depend on the identified geographicregion.
 18. An energy cost optimization system for a building, thesystem comprising: HVAC equipment configured to consume one or moreresources purchased from a utility or generated by a central plant foruse in satisfying a building energy load; and a controller configuredto: obtain a cost function comprising a peak load contribution (PLC)term, wherein the PLC term represents a cost based on an amount of theone or more resources purchased from the utility during coincidentalpeak (CP) hours of an optimization period comprising a plurality of timesteps, the CP hours comprising a subset of the plurality of time stepsin the optimization period, wherein the cost is a function of one ormore decision variables representing an amount of the one or moreresources to be consumed by the HVAC equipment during each of theplurality of time steps; modify the cost function by applying a peakhours mask to the PLC term, wherein the peak hours mask identifies oneor more hours in the optimization period as projected peak hours andcauses the controller to assign substantially zero cost, in the PLCterm, to the one or more resources purchased from the utility during anyhours not identified as projected peak hours; and allocate, to each ofthe time steps within the optimization period, an amount of the one ormore resources to be consumed by the HVAC equipment during the time stepby performing an optimization process of the modified cost function todetermine values of the decision variables.
 19. The energy costoptimization system of claim 18, wherein the peak hours mask comprises avector of binary values, each of the binary values corresponding to anhour of the optimization period and indicating whether the correspondinghour is a projected peak hour.
 20. The energy cost optimization systemof claim 18, wherein: the PLC term comprises a rate factor defining acost per unit of the electrical energy purchased from the utility duringthe CP hours; and the controller is configured to: identify a geographicregion in which the building is located; and calculate the rate factorbased on one or more parameters that depend on the identified geographicregion.